diff --git a/content/guides/azure-todo-static-web-app.md b/content/guides/azure-todo-static-web-app.md index ae0e116342..ec15bcbac5 100644 --- a/content/guides/azure-todo-static-web-app.md +++ b/content/guides/azure-todo-static-web-app.md @@ -486,11 +486,11 @@ const getTodos = async () => { if (error.code === '42P01') { // Table does not exist, so create it await sql` - CREATE TABLE todos ( - id SERIAL PRIMARY KEY, - text TEXT NOT NULL, - completed BOOLEAN NOT NULL - )`; + CREATE TABLE todos ( + id SERIAL PRIMARY KEY, + text TEXT NOT NULL, + completed BOOLEAN NOT NULL + )`; return []; } throw error; @@ -522,10 +522,10 @@ app.http('todos', { } const createdTodo = await sql` - INSERT INTO todos (text, completed) - VALUES (${newTodo.text}, ${newTodo.completed || false}) - RETURNING * - `; + INSERT INTO todos (text, completed) + VALUES (${newTodo.text}, ${newTodo.completed || false}) + RETURNING * + `; return { status: 201, jsonBody: createdTodo }; case 'put': @@ -540,11 +540,11 @@ app.http('todos', { } const todo = await sql` - UPDATE todos - SET completed = ${updatedTodo.completed} - WHERE id = ${updatedTodo.id} - RETURNING * - `; + UPDATE todos + SET completed = ${updatedTodo.completed} + WHERE id = ${updatedTodo.id} + RETURNING * + `; if (todo.length === 0) { return { @@ -566,10 +566,10 @@ app.http('todos', { } const deletedTodo = await sql` - DELETE FROM todos - WHERE id = ${id} - RETURNING * - `; + DELETE FROM todos + WHERE id = ${id} + RETURNING * + `; if (deletedTodo.length === 0) { return {