Skip to content

Commit

Permalink
Merge pull request #364 from mission-apprentissage/server/get-create-…
Browse files Browse the repository at this point in the history
…campagne-error

[Serveur] Throw create erreur
  • Loading branch information
yohanngab authored Nov 18, 2024
2 parents 21f5c34 + 3da3b02 commit 31779a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/controllers/campagnes.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const getCampagne = tryCatch(async (req: any, res: any) => {
export const createCampagnes = tryCatch(async (req: any, res: any) => {

Check warning on line 62 in server/src/controllers/campagnes.controller.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

Unexpected any. Specify a different type

Check warning on line 62 in server/src/controllers/campagnes.controller.ts

View workflow job for this annotation

GitHub Actions / tests / Tests

Unexpected any. Specify a different type
const { success, body } = await campagnesService.createCampagnes(req.body, req.user.id);

if (!success) throw new BasicError();
if (!success) throw new BasicError(body);

return res.status(201).json(body);
});
Expand Down

0 comments on commit 31779a4

Please sign in to comment.