0
I have a Sessioncontroller, which is the method that performs the user authentication process in the application.
class SessionController {
async store ({ request, response, auth }) {
const data = request.all()
const token = await auth.attemp(data.email, data.password)
return token
}
}
My Routes.js, tbm has the instance of this method for API mapping:
Route.post('/sessions', 'SessionController.store')
The user data is already in the database, the problem is that when I perform the request, returns me an error 500.
I debugged the application, and it seems that the application does not run after the line const token = await auth.attemp(data.email, data.password)
.
With no idea what it could be!