aboutsummaryrefslogtreecommitdiff
path: root/bot/src/api/routes/blacklist.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-04-02 02:21:41 -0400
committerAndrew Lee <andrew@alee14.me>2025-04-02 02:21:41 -0400
commit10434adad478d21bbb834a5803125db9f54c9d6c (patch)
treee1159a26948d24c2a065dfd15f71b64970515930 /bot/src/api/routes/blacklist.js
parent657599acccf351c7c9366cec9f648b7496c89bdb (diff)
downloadAleeBot-beta.tar.gz
AleeBot-beta.tar.bz2
AleeBot-beta.zip
Added i18n (basic); Blacklist feature; Put error msg into a filebeta
Diffstat (limited to 'bot/src/api/routes/blacklist.js')
-rw-r--r--bot/src/api/routes/blacklist.js47
1 files changed, 47 insertions, 0 deletions
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;
+}