This commit is contained in:
Leandro Facchinetti 2021-03-12 10:06:07 +00:00
parent 9b397e299f
commit d75e47bf5a
1 changed files with 2 additions and 0 deletions

View File

@ -335,12 +335,14 @@ export default function killTheNewsletter(
</p>`
)
);
const feedId = database.run(
sql`INSERT INTO "feeds" ("title") VALUES (${req.body.name})`
).lastInsertRowid;
const entry = database.get<{ title: string; content: HTML }>(
sql`SELECT "title", "content" FROM "entries" WHERE "feed" = ${feedId}`
)!;
res.send(
layout(html`
<p><strong>${entry.title}</strong></p>