Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit 3c5eccb9 authored by 65160381's avatar 65160381
Browse files

7.5

parent 3889aeb7
No related branches found
No related tags found
No related merge requests found
Pipeline #593 passed with warnings
......@@ -95,13 +95,15 @@ app.post('/register', async (req, res) => {
[email, hashedPassword]
);
res.status(201).json({ message: 'User registered successfully' });
// หลังจากสมัครเสร็จแล้ว Redirect ไปหน้า Login
res.redirect('/login');
} catch (error) {
console.error('❌ Registration failed:', error);
res.status(500).json({ error: 'Registration failed' });
}
});
app.post('/login', async (req, res) => {
const { email, password } = req.body;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment