Move authenticate url to config

This commit is contained in:
Juan Cruz Viotti 2014-12-01 09:52:45 -04:00
parent d4b189f785
commit db51ed9d1e
2 changed files with 3 additions and 1 deletions

View File

@ -3,9 +3,10 @@ _ = require('lodash')
token = require('../token/token')
server = require('../server/server')
config = require('../config')
exports.authenticate = (credentials, callback) ->
server.post '/login_', credentials, (error, response) ->
server.post config.urls.authenticate, credentials, (error, response) ->
return callback(error, response?.body)
exports.login = (credentials, callback) ->

View File

@ -28,6 +28,7 @@ config.urls =
preferences: '/preferences'
keys: '/user/keys'
identify: '/blink'
authenticate: '/login_'
# Append config.remoteUrl before every url
config.urls = _.object _.map config.urls, (value, key, object) ->