This commit is contained in:
2026-01-10 18:24:54 +01:00
parent ad37e26426
commit be7e3b88d5
3 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ async function startServer()
await createTables();
app.use('/api/auth', authRouter);
app.get('/api/', (req, res) => res.send('Backend running'));
app.get('/api', (req, res) => res.send('Backend running'));
app.listen(3001, () =>
{
+1
View File
@@ -14,6 +14,7 @@ router.post('/register', async(req, res) =>
router.post('/login', async(req, res) =>
{
console.log("received login!");
const {username, password} = req.body;
const result = await authService.login(username, password);
res.status(result.status).json(result.data);