From 84468cf28a46bc0de2ba93ed50d1aa93d1a247e5 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Mon, 18 Jul 2022 12:17:17 +0800 Subject: [PATCH] Use GET instead of get for HTTP request. --- app/static/js/word_operation.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/static/js/word_operation.js b/app/static/js/word_operation.js index 36a023b..dd650f8 100644 --- a/app/static/js/word_operation.js +++ b/app/static/js/word_operation.js @@ -3,7 +3,7 @@ function familiar(index) { let word = $("#word_" + index).text(); let freq = $("#freq_" + index).text(); $.ajax({ - type:"get", + type:"GET", url:"/" + username + "/" + word + "/familiar", success:function(response){ let new_freq = freq - 1; @@ -21,7 +21,7 @@ function unfamiliar(index) { let word = $("#word_" + index).text(); let freq = $("#freq_" + index).text(); $.ajax({ - type:"get", + type:"GET", url:"/" + username + "/" + word + "/unfamiliar", success:function(response){ let new_freq = parseInt(freq) + 1; @@ -34,7 +34,7 @@ function delete_word(index) { let username = $("#username").text(); let word = $("#word_" + index).text(); $.ajax({ - type:"get", + type:"GET", url:"/" + username + "/" + word + "/del", success:function(response){ $("#p_" + index).remove();