mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 02:51:57 +02:00
Merge pull request #9755 from overleaf/jpa-dropbox-use-project-id-from-web
[misc] let web feed back projectId to resolve "unknown project" updates GitOrigin-RevId: d005370e7a1e7a4a5d9e54d62e47dfff3541f8f1
This commit is contained in:
@@ -54,6 +54,7 @@ async function mergeUpdate(req, res) {
|
||||
|
||||
const payload = {
|
||||
status: 'applied',
|
||||
projectId: metadata.projectId.toString(),
|
||||
entityId: metadata.entityId.toString(),
|
||||
entityType: metadata.entityType,
|
||||
folderId: metadata.folderId.toString(),
|
||||
|
||||
@@ -83,6 +83,7 @@ async function _mergeUpdate(userId, projectId, path, fsPath, source) {
|
||||
userId
|
||||
)
|
||||
return {
|
||||
projectId,
|
||||
entityType: 'file',
|
||||
entityId: file._id,
|
||||
rev: file.rev,
|
||||
@@ -97,6 +98,7 @@ async function _mergeUpdate(userId, projectId, path, fsPath, source) {
|
||||
source
|
||||
)
|
||||
return {
|
||||
projectId,
|
||||
entityType: 'doc',
|
||||
entityId: doc._id,
|
||||
rev: doc.rev,
|
||||
|
||||
@@ -10,6 +10,7 @@ const MODULE_PATH =
|
||||
describe('TpdsController', function () {
|
||||
beforeEach(function () {
|
||||
this.metadata = {
|
||||
projectId: ObjectId(),
|
||||
entityId: ObjectId(),
|
||||
folderId: ObjectId(),
|
||||
entityType: 'doc',
|
||||
@@ -74,6 +75,7 @@ describe('TpdsController', function () {
|
||||
json: payload => {
|
||||
expect(payload).to.deep.equal({
|
||||
status: 'applied',
|
||||
projectId: this.metadata.projectId.toString(),
|
||||
entityId: this.metadata.entityId.toString(),
|
||||
folderId: this.metadata.folderId.toString(),
|
||||
entityType: this.metadata.entityType,
|
||||
|
||||
Reference in New Issue
Block a user