Skip to content

Commit 415c19f

Browse files
authored
Merge pull request #572 from codex-team/fix/conv
fix(converter): rewrite lastVisit => add new key
2 parents f56e8cc + 8fe3c15 commit 415c19f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

convertors/set-user-project-last-visit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function run() {
3535
const userDocument = usersDocuments.find(u => u._id.toString() === userInProject.userId.toString());
3636
if (userDocument) {
3737
const projectId = collectionName.split(':')[1];
38-
await hawkDb.collection('users').updateOne({ _id: userDocument._id }, { $set: { projectsLastVisit: { [projectId]: userInProject.timestamp } } });
38+
await hawkDb.collection('users').updateOne({ _id: userDocument._id }, { $set: { [`projectsLastVisit.${projectId}`]: userInProject.timestamp } });
3939
usersUpdatedCount++;
4040
console.log(`Updated ${usersUpdatedCount}/${usersInProject.length} users in project ${collectionName}.`);
4141
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.2.14",
3+
"version": "1.2.15",
44
"main": "index.ts",
55
"license": "BUSL-1.1",
66
"scripts": {

0 commit comments

Comments
 (0)