You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 20, 2025. It is now read-only.
awaitclient.query('INSERT INTO todos (text, done) VALUES ($1, $2)', [
104
-
text,
103
+
awaitclient.query('INSERT INTO todos (content, done) VALUES ($1, $2)', [
104
+
content,
105
105
false,
106
106
])
107
107
})
108
108
109
-
// Update text of a todo
109
+
// Update content of a todo
110
110
mainApi.patch('/todos/:id', async (ctx) => {
111
111
const { id } =ctx.req.params
112
-
const { text } =ctx.req.json()
112
+
const { content } =ctx.req.json()
113
113
const client =awaitgetClient()
114
-
awaitclient.query('UPDATE todos SET text = $1 WHERE id = $2', [
115
-
text,
114
+
awaitclient.query('UPDATE todos SET content = $1 WHERE id = $2', [
115
+
content,
116
116
parseInt(id),
117
117
])
118
118
})
@@ -149,7 +149,7 @@ Using the dashboard, apply your migrations from the databases tab to initialize
149
149
150
150
### Add some todos using the Nitric dashboard
151
151
152
-
Open the local dashboard at <atarget="_blank"href="http://localhost:49152">localhost:49152</a>, then navigate to the `POST /todos` endpoint and add some content to the body of the request, stating the `text` key and value of the todo task and click send.
152
+
Open the local dashboard at <atarget="_blank"href="http://localhost:49152">localhost:49152</a>, then navigate to the `POST /todos` endpoint and add some content to the body of the request, stating the `content` key and value of the todo task and click send.
153
153
154
154

0 commit comments