Merge pull request #2522 from overleaf/sk-set-last-updated-by-on-creation

Set lastUpdatedBy when a project is created

GitOrigin-RevId: ed3a7379b538cc40932f61fc17a926e00eb2abdb
This commit is contained in:
Simon Detheridge 2020-01-21 09:35:08 +00:00 committed by Copybot
parent 0970ddbd6c
commit 7ce322758b
2 changed files with 2 additions and 1 deletions

View file

@ -96,7 +96,7 @@ const ProjectCreationHandler = {
}
const rootFolder = new Folder({ name: 'rootFolder' })
attributes.owner_ref = new ObjectId(owner_id)
attributes.lastUpdatedBy = attributes.owner_ref = new ObjectId(owner_id)
attributes.name = projectName
const project = new Project(attributes)

View file

@ -110,6 +110,7 @@ describe('ProjectCreationHandler', function() {
}
project.name.should.equal(projectName)
expect(project.owner_ref + '').to.equal(ownerId)
expect(project.lastUpdatedBy + '').to.equal(ownerId)
done()
}
)