Merge pull request #16979 from overleaf/jpa-join-project-remove-sl-1

[misc] joinProject: pass userId and anonymous access token in body 1/2

GitOrigin-RevId: 5d7832246c7262c004c2cd465d62488384b35ee3
This commit is contained in:
Jakob Ackermann
2024-02-09 11:26:16 +00:00
committed by Copybot
parent c3e7d14a03
commit b587edb683
9 changed files with 165 additions and 6 deletions
@@ -167,6 +167,7 @@ describe('EditorHttpController', function () {
beforeEach(function () {
this.req.params = { Project_id: this.project._id }
this.req.query = { user_id: this.user._id }
this.req.body = { userId: this.user._id }
})
describe('successfully', function () {
@@ -251,6 +252,10 @@ describe('EditorHttpController', function () {
beforeEach(function (done) {
this.token = 'token'
this.TokenAccessHandler.getRequestToken.returns(this.token)
this.req.body = {
userId: 'anonymous-user',
anonymousAccessToken: this.token,
}
this.req.query = { user_id: 'anonymous-user' }
this.req.headers = { 'x-sl-anonymous-access-token': this.token }
this.res.callback = done