Use GET instead of get for HTTP request.

Bug400-QiuZhonghui
Lan Hui 2022-07-18 12:17:17 +08:00
parent e9675ec8ee
commit 84468cf28a
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ function familiar(index) {
let word = $("#word_" + index).text(); let word = $("#word_" + index).text();
let freq = $("#freq_" + index).text(); let freq = $("#freq_" + index).text();
$.ajax({ $.ajax({
type:"get", type:"GET",
url:"/" + username + "/" + word + "/familiar", url:"/" + username + "/" + word + "/familiar",
success:function(response){ success:function(response){
let new_freq = freq - 1; let new_freq = freq - 1;
@ -21,7 +21,7 @@ function unfamiliar(index) {
let word = $("#word_" + index).text(); let word = $("#word_" + index).text();
let freq = $("#freq_" + index).text(); let freq = $("#freq_" + index).text();
$.ajax({ $.ajax({
type:"get", type:"GET",
url:"/" + username + "/" + word + "/unfamiliar", url:"/" + username + "/" + word + "/unfamiliar",
success:function(response){ success:function(response){
let new_freq = parseInt(freq) + 1; let new_freq = parseInt(freq) + 1;
@ -34,7 +34,7 @@ function delete_word(index) {
let username = $("#username").text(); let username = $("#username").text();
let word = $("#word_" + index).text(); let word = $("#word_" + index).text();
$.ajax({ $.ajax({
type:"get", type:"GET",
url:"/" + username + "/" + word + "/del", url:"/" + username + "/" + word + "/del",
success:function(response){ success:function(response){
$("#p_" + index).remove(); $("#p_" + index).remove();