balena-cli/lib/cli-modules/auth/auth.coffee

9 lines
271 B
CoffeeScript
Raw Normal View History

server = require('../../server/server')
exports.getToken = (credentials, callback) ->
server.post '/login_', credentials, (error, response) ->
return callback(error, response?.body)
exports.login = (credentials, callback) ->
exports.getToken(credentials, callback)