Skip to content

Commit

Permalink
Add response to user
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgehl3n committed Oct 5, 2023
1 parent 347ccde commit 40d2034
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/controllers/UserController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ const _mapRequestToData = async (req: Request) => {

export default class UserController {
public static async save(req: Request, res: Response) {
const map = await _mapRequestToData(req);
await UserService.SaveWithDependences(map);
try {
const map = await _mapRequestToData(req);
await UserService.SaveWithDependences(map);
return res.status(200).send({});
} catch (error) {
console.error(error);
return res.status(500).json(error).send();
}
}
}

0 comments on commit 40d2034

Please sign in to comment.