dburl geaendert
This commit is contained in:
@@ -25,15 +25,6 @@ router.post('/register', async (req, res) => {
|
||||
}
|
||||
)
|
||||
|
||||
// now that we have a user, I want to add their first todo for them
|
||||
const defaultTodo = `Hello :) Add your first todo!`
|
||||
await prisma.todo.create({
|
||||
data:{
|
||||
task: defaultTodo,
|
||||
userId: user.id
|
||||
}
|
||||
})
|
||||
|
||||
// create a token
|
||||
const token = jwt.sign({ id: user.id }, process.env.JWT_SECRET, { expiresIn: '24h' })
|
||||
res.json({ token })
|
||||
|
||||
Reference in New Issue
Block a user