From a0bb6f0a3ef75fa46a982384a00a85a9b652d607 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2026 17:03:16 -0400 Subject: add reaction support --- api/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'api/index.ts') diff --git a/api/index.ts b/api/index.ts index 9435bb1..a2a1378 100644 --- a/api/index.ts +++ b/api/index.ts @@ -25,6 +25,16 @@ app.get('/attachments/:slug', (req, res) => { } }); +app.get('/reactions/:slug', (req, res) => { + if (req.params.slug) { + const query = db.prepare(`SELECT * FROM announcements_reactions WHERE msg_id = (?)`); + const result = query.all(req.params.slug); + res.send(result); + } else { + res.send('Unknown message id.'); + } +}); + app.listen(port, () => { console.log(`Server is running on port ${port}`); }); -- cgit v1.2.3