Skip to content

Commit

Permalink
fixing type
Browse files Browse the repository at this point in the history
  • Loading branch information
cdleveille committed Nov 6, 2024
1 parent e94e782 commit f1c6de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/bag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const getBags = (user_id?: string) => BagModel.find(user_id ? { user_id } : {},

const createBag = async (user_id: string, name: string) => {
const existingBag = await BagModel.findOne({ user_id, name });
if (existingBag) throw new CustomError(`You already have a bag named ${name}'`, 400);
if (existingBag) throw new CustomError(`You already have a bag named '${name}'`, 400);
return BagModel.create({ user_id, name });
};

Expand Down

0 comments on commit f1c6de4

Please sign in to comment.