Created
June 27, 2018 23:06
-
-
Save diego3g/0ef1af3e5dcf59750992bd0e98ef2d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
class SessionController { | |
async create ({ request, auth }) { | |
const { email, password } = request.all() | |
const token = await auth.attempt(email, password) | |
return token | |
} | |
} | |
module.exports = SessionController |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment