mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Change anonToken
to anonymousAccessToken
This commit is contained in:
parent
438bb28c04
commit
76673d5f0a
2 changed files with 4 additions and 4 deletions
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue