aboutsummaryrefslogtreecommitdiff
path: root/bot/src/api
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-03-23 01:39:11 -0400
committerAndrew Lee <andrew@alee14.me>2025-03-23 01:39:11 -0400
commitd7c46a9eae28046bb26da182abc298dc18ed5a10 (patch)
treea1f9955a757b150b88ed5398ef851ab2d1d4a46b /bot/src/api
parentb60e681998a456adecb93b5fe04b66ad4ac9abb6 (diff)
downloadAleeBot-d7c46a9eae28046bb26da182abc298dc18ed5a10.tar.gz
AleeBot-d7c46a9eae28046bb26da182abc298dc18ed5a10.tar.bz2
AleeBot-d7c46a9eae28046bb26da182abc298dc18ed5a10.zip
Replacing Astro with Next.JS; Prefix warning; Consistent env vars
Diffstat (limited to 'bot/src/api')
-rw-r--r--bot/src/api/routes/settings.js4
-rw-r--r--bot/src/api/server.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/bot/src/api/routes/settings.js b/bot/src/api/routes/settings.js
index 68d8745..8757874 100644
--- a/bot/src/api/routes/settings.js
+++ b/bot/src/api/routes/settings.js
@@ -35,7 +35,9 @@ export function settingsRouter(client) {
channels.push(channelInfo);
});
- res.json(channels);
+ res.json({
+ channels: channels
+ });
} catch (e) {
console.error('Error fetching settings:', e);
res.status(500).send('Internal Server Error');
diff --git a/bot/src/api/server.js b/bot/src/api/server.js
index 74d8511..15211eb 100644
--- a/bot/src/api/server.js
+++ b/bot/src/api/server.js
@@ -74,8 +74,8 @@ export const apiServer = (client) => {
});
// Start the server
- app.listen(process.env.port, () => {
- console.log(`[i] Starting API at http://localhost:${process.env.port}`);
+ app.listen(process.env.PORT, () => {
+ console.log(`[i] Starting API at http://localhost:${process.env.PORT}`);
});
};