Last active
December 28, 2017 16:28
-
-
Save rafaellucio/5517bbf44dfcfd078cc871f3d0b1d28f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import Auth from './auth' | |
import Logger from './logger' | |
class LoginService { | |
static async loggin(user, pass) { | |
const logger = new Logger(); | |
try { | |
const user = await Auth.authenticate(user, pass) | |
logger.sucesso(JSON.stringify(user)) | |
} catch (error) { | |
logger.error(JSON.stringify(error)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment