some process in the web sockets ruining the linesmap

This commit is contained in:
talksik
2022-05-07 12:22:47 -05:00
parent 2c8ca0a62b
commit 19abc4b9fa
5 changed files with 38 additions and 20 deletions
+6 -1
View File
@@ -120,7 +120,10 @@ export class LineService {
userId: string,
newState: LineMemberState
) {
const query = { lineId, userId: new ObjectId(userId) };
const query = {
lineId: new ObjectId(lineId),
userId: new ObjectId(userId),
};
const updateSet = { $set: { state: newState, lastVisitDate: new Date() } };
const updateRes = await collections.lineMembers?.findOneAndUpdate(
@@ -128,6 +131,8 @@ export class LineService {
updateSet
);
console.log(updateRes);
return updateRes;
}