mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
finish session controller
This commit is contained in:
1 parent
c0ec382510
commit
fd543ed594
3 files changed
+88
-77
No files matched your search
@@ -120,9 +120,9 @@ export async function isQuestUnlocked(
|
||||
user: HydratedDocument<IUser>,
|
||||
questId: string
|
||||
): Promise<boolean> {
|
||||
const userProfile = await UserProfile.findOne({ user: user._id })
|
||||
const userProfile = await UserProfile.findOne({ user: user.id })
|
||||
if (!userProfile) {
|
||||
throw new Error(`UserProfile ${user._id} not found`)
|
||||
throw new Error(`UserProfile ${user.id} not found`)
|
||||
}
|
||||
const quest = await Quest.findById(questId)
|
||||
if (!quest) {
|
||||
|
||||
Reference in new issue
Block a user