Skip to content

Instantly share code, notes, and snippets.

@diego3g
Created June 27, 2018 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diego3g/0ef1af3e5dcf59750992bd0e98ef2d53 to your computer and use it in GitHub Desktop.
Save diego3g/0ef1af3e5dcf59750992bd0e98ef2d53 to your computer and use it in GitHub Desktop.
'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