mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Get anonToken from joinProject payload
This commit is contained in:
parent
d4c735c3ea
commit
438bb28c04
1 changed files with 2 additions and 3 deletions
|
@ -67,9 +67,8 @@ module.exports = Router =
|
|||
user = {_id: "anonymous-user"}
|
||||
|
||||
client.on "joinProject", (data = {}, callback) ->
|
||||
anonToken = session?.anonReadOnlyTokenAccess?[data.project_id]
|
||||
if anonToken
|
||||
user.anonToken = anonToken
|
||||
if data.anonToken
|
||||
user.anonToken = data.anonToken
|
||||
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}
|
||||
|
|
Loading…
Reference in a new issue