aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.ts b/src/index.ts
index dac8807..c5cf39a 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -23,8 +23,9 @@ app
timestamp: { format: "YYYY-MM-DDTHH:mm:ssZ" },
}))
.get(ExampleApi.ListRequest.path, async (_req, res) => {
+ const examples: ExampleApi.Example[] = await client.query("SELECT * FROM examples").then(r => r.rows)
const response: ExampleApi.ListResponse.Body = {
- examples: [{ id: "123", title: "foobar", content: "10 20 + ." }],
+ examples,
}
res.send(response)
})