basic admin dash route
pull/243/head
Josh Moore 1 year ago
parent 6ac59b60cb
commit 059b20e714

@ -110,6 +110,9 @@ async function main() {
app.get('/.ass.host', (req, res) => res.send(req.ass.host)); app.get('/.ass.host', (req, res) => res.send(req.ass.host));
// ! I did not want to do it like this how tf did I back myself into this shit
app.get('/admin', (req, res) => res.render('admin', { version: App.pkgVersion }))
// Routing // Routing
app.use('/setup', (await import('./routers/setup.js')).router); app.use('/setup', (await import('./routers/setup.js')).router);
app.use('/api', (await import('./routers/api.js')).router); app.use('/api', (await import('./routers/api.js')).router);

@ -106,7 +106,7 @@ document.addEventListener('DOMContentLoaded', () => {
message: string message: string
}) => { }) => {
alert(data.message); alert(data.message);
if (data.success) window.location.href = '/dashboard'; if (data.success) window.location.href = '/admin';
}); });
}) })
.catch((err) => errAlert('POST to /setup failed!', err)) .catch((err) => errAlert('POST to /setup failed!', err))

@ -0,0 +1,5 @@
extends _base_
block section
span admin
block content
h1.text-3xl Coming soon.
Loading…
Cancel
Save