File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ async function addTask(description) {
100100// [START datastore_update_entity]
101101async function markDone ( taskId ) {
102102 const transaction = datastore . transaction ( ) ;
103- const taskKey = datastore . key ( [ 'Task' , taskId ] ) ;
103+ const taskKey = datastore . key ( [ 'Task' , datastore . int ( taskId ) ] ) ;
104104
105105 try {
106106 await transaction . run ( ) ;
@@ -133,7 +133,7 @@ async function listTasks() {
133133
134134// [START datastore_delete_entity]
135135async function deleteTask ( taskId ) {
136- const taskKey = datastore . key ( [ 'Task' , taskId ] ) ;
136+ const taskKey = datastore . key ( [ 'Task' , datastore . int ( taskId ) ] ) ;
137137
138138 await datastore . delete ( taskKey ) ;
139139 console . log ( `Task ${ taskId } deleted successfully.` ) ;
You can’t perform that action at this time.
0 commit comments