Skip to content

Commit

Permalink
feat :improved getRocketChatBoard
Browse files Browse the repository at this point in the history
  • Loading branch information
CulturalProfessor committed Jun 11, 2023
1 parent 22c755e commit 731a68e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imports/models/RocketChatCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RocketChatCollectionClass extends BaseCollection<RocketChatUserReco
username: string,
boardname: string
): Promise<RocketChatUserRecord | null> {
const document = await this.collection.findOneAsync({ _id: boardname })
const document = await this.collection.findOneAsync({ _id: boardname, userId: userId, username: username })
console.log('Document', document)
return document as RocketChatUserRecord
}
Expand All @@ -52,6 +52,7 @@ export class RocketChatCollectionClass extends BaseCollection<RocketChatUserReco
return {
_id: boardname,
username: username,
userId: userId,
title: boardname,
created_at: Date.now(),
last_updated: Date.now(),
Expand Down

0 comments on commit 731a68e

Please sign in to comment.