Change anonToken to anonymousAccessToken

This commit is contained in:
Shane Kilkelly 2017-10-20 10:10:58 +01:00
parent 438bb28c04
commit 76673d5f0a
2 changed files with 4 additions and 4 deletions

View file

@ -67,8 +67,8 @@ module.exports = Router =
user = {_id: "anonymous-user"}
client.on "joinProject", (data = {}, callback) ->
if data.anonToken
user.anonToken = data.anonToken
if data.anonymousAccessToken
user.anonymousAccessToken = data.anonymousAccessToken
WebsocketController.joinProject client, user, data.project_id, (err, args...) ->
if err?
Router._handleError callback, err, client, "joinProject", {project_id: data.project_id, user_id: user?.id}

View file

@ -8,8 +8,8 @@ module.exports = WebApiManager =
logger.log {project_id, user_id}, "sending join project request to web"
url = "#{settings.apis.web.url}/project/#{project_id}/join"
headers = {}
if user.anonToken?
headers['x-sl-anon-token'] = user.anonToken
if user.anonymousAccessToken?
headers['x-sl-anonymous-access-token'] = user.anonToken
request.post {
url: url
qs: {user_id}