Skip to content

Commit

Permalink
better log
Browse files Browse the repository at this point in the history
  • Loading branch information
Frenkii committed Mar 22, 2024
1 parent 32afd00 commit 31ecf44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/http/apiController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ async function updateMember(req: Request, res: Response) {
const guild = DiscordBotClient.guilds.cache.get(Config.GUILD_ID);
const cid = req.body.cid;
const teams: string[] = req.body.teams;

console.log(`Attempting to update User: ${cid}. Teams: ${teams}...`);
console.log(`Homepage Request for User: ${cid}. Teams: ${teams}`);

const user: UserDocument | null = await userService.getUserByCid(cid);

Expand Down
2 changes: 1 addition & 1 deletion src/services/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async function getUserByCid(cid: number): Promise<UserDocument> {
const user: UserDocument | null = await userModel.findOne({ cid: cid });

if (!user) {
throw new Error('Pilot not found');
throw new Error('User not found.');
}
return user;
} catch (error) {
Expand Down

0 comments on commit 31ecf44

Please sign in to comment.