From 10434adad478d21bbb834a5803125db9f54c9d6c Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 2 Apr 2025 02:21:41 -0400 Subject: Added i18n (basic); Blacklist feature; Put error msg into a file --- bot/src/api/routes/blacklist.js | 47 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 bot/src/api/routes/blacklist.js (limited to 'bot/src/api') diff --git a/bot/src/api/routes/blacklist.js b/bot/src/api/routes/blacklist.js new file mode 100644 index 0000000..ffcd60b --- /dev/null +++ b/bot/src/api/routes/blacklist.js @@ -0,0 +1,47 @@ +import { Router } from 'express'; + +export function authRouter() { + const router = Router(); + + router.post('/blacklist/guild/add', async (req, res) => { + const { guildID } = req.body; + try { + res.status(200).send({ message: 'Added to the blacklist' }); + } catch (error) { + console.error('Something went wrong:', error); + res.status(500).send({ message: 'Internal Server Error' }); + } + }); + + router.post('/blacklist/user/add', async (req, res) => { + const { userID } = req.body; + try { + res.status(200).send({ message: 'Added to the blacklist' }); + } catch (error) { + console.error('Something went wrong:', error); + res.status(500).send({ message: 'Internal Server Error' }); + } + }); + + router.post('/blacklist/guild/remove', async (req, res) => { + const { guildID } = req.body; + try { + res.status(200).send({ message: 'Removed from the blacklist' }); + } catch (error) { + console.error('Something went wrong:', error); + res.status(500).send({ message: 'Internal Server Error' }); + } + }); + + router.post('/blacklist/user/remove', async (req, res) => { + const { userID } = req.body; + try { + res.status(200).send({ message: 'Removed from the blacklist' }); + } catch (error) { + console.error('Something went wrong:', error); + res.status(500).send({ message: 'Internal Server Error' }); + } + }); + + return router; +} -- cgit v1.2.3