Add dashboard frontend

This commit is contained in:
2026-01-27 14:33:32 +01:00
parent bb13f086df
commit f610d7a922
4 changed files with 504 additions and 0 deletions
+5
View File
@@ -260,6 +260,7 @@ const createDashboardApp = () => {
const app = express();
app.use(express.json());
app.use(express.static(path.join(__dirname, 'public')));
app.get('/auth/discord', (req, res) => {
if (!ensureOAuthConfig()) {
@@ -313,6 +314,10 @@ const createDashboardApp = () => {
return res.redirect(DASHBOARD_CLIENT_URL);
}
if (req.accepts('html')) {
return res.redirect('/');
}
return res.status(200).json({ user });
} catch (error) {
return res.status(502).json({ error: 'Failed to authenticate with Discord' });