Example commit

This commit is contained in:
Dennis Postma 2024-06-06 19:57:26 +02:00
parent ccf14fcd6b
commit 30160a93af

View File

@ -22,7 +22,7 @@ async function addAuthRoutes(app: Application) {
const userService = new UserService();
const user = await userService.login(username, password);
if (user) {
if (user) { //test
const token = jwt.sign({ id: user.id }, config.JWT_SECRET, { expiresIn: '1h' });
return res.status(200).json({ token });
}