Skip to content

Commit

Permalink
Verificação de DEMOVERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Mar 10, 2023
1 parent 5146c2a commit edf9b37
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/src/controllers/UserController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ export const update = async (
throw new AppError("ERR_NO_PERMISSION", 403);
}

if (process.env.DEMO === "ON") {
throw new AppError("ERR_NO_PERMISSION", 403);
}

const userData = req.body;

const user = await UpdateUserService({ userData, userId });
Expand All @@ -117,6 +121,10 @@ export const remove = async (
throw new AppError("ERR_NO_PERMISSION", 403);
}

if (process.env.DEMO === "ON") {
throw new AppError("ERR_NO_PERMISSION", 403);
}

await DeleteUserService(userId);

const io = getIO();
Expand Down

0 comments on commit edf9b37

Please sign in to comment.