Skip to content

Commit

Permalink
Fix user update in link function
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaUrsa committed Dec 13, 2023
1 parent 7a14d81 commit 31c4c42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/global/commands/g.learn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function link(

log.debug(F, `moodleUserData: ${JSON.stringify(moodleUserData.username)}`);

tripbotDb.users.update({
const result = await tripbotDb.users.update({
where: {
id: userData.id,
},
Expand All @@ -98,6 +98,8 @@ export async function link(
},
});

log.debug(F, `result: ${JSON.stringify(result)}`);

return stripIndents`You have linked the moodle account - ${email} (${moodleUserData.username}) - with Discord account ${discordId}
Use the /learn profile command to see the profile!`;
}
Expand Down

0 comments on commit 31c4c42

Please sign in to comment.