Skip to content

Commit 65f2c9c

Browse files
committed
fixed delete item on specific todolist
1 parent 6540b0f commit 65f2c9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ <h2 v-on:click="activateTodolist">{{todolist.title}} </h2>\
9494
},
9595
deleteItemInTodo: function(todoItem) {
9696
var todoId = this.todolist.id;
97-
let ajaxDeleteUrl = 'http://localhost:3000/api/todos/todos/1/items/' + todoItem.id
97+
let ajaxDeleteUrl = 'http://localhost:3000/api/todos/todos/'+ todoId +'/items/' + todoItem.id
9898
this.todolist.all_items = this.todolist.all_items.filter(function(item) { return item.id !== todoItem.id});
9999
$.ajax({
100100
type: "DELETE",

0 commit comments

Comments
 (0)