mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-22 06:57:48 +00:00
Move authenticate url to config
This commit is contained in:
parent
d4b189f785
commit
db51ed9d1e
@ -3,9 +3,10 @@ _ = require('lodash')
|
|||||||
|
|
||||||
token = require('../token/token')
|
token = require('../token/token')
|
||||||
server = require('../server/server')
|
server = require('../server/server')
|
||||||
|
config = require('../config')
|
||||||
|
|
||||||
exports.authenticate = (credentials, callback) ->
|
exports.authenticate = (credentials, callback) ->
|
||||||
server.post '/login_', credentials, (error, response) ->
|
server.post config.urls.authenticate, credentials, (error, response) ->
|
||||||
return callback(error, response?.body)
|
return callback(error, response?.body)
|
||||||
|
|
||||||
exports.login = (credentials, callback) ->
|
exports.login = (credentials, callback) ->
|
||||||
|
@ -28,6 +28,7 @@ config.urls =
|
|||||||
preferences: '/preferences'
|
preferences: '/preferences'
|
||||||
keys: '/user/keys'
|
keys: '/user/keys'
|
||||||
identify: '/blink'
|
identify: '/blink'
|
||||||
|
authenticate: '/login_'
|
||||||
|
|
||||||
# Append config.remoteUrl before every url
|
# Append config.remoteUrl before every url
|
||||||
config.urls = _.object _.map config.urls, (value, key, object) ->
|
config.urls = _.object _.map config.urls, (value, key, object) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user