Skip to content

Commit

Permalink
✔ Pro/De ~ Mote 😡
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed Jul 7, 2023
1 parent d8c7295 commit 4df0d9f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/fansubid/browser/ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1688709494122,
"timestamp": 1688710318952,
"index": "/index.html",
"assetGroups": [
{
Expand Down
2 changes: 1 addition & 1 deletion dist/fansubid/server/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/api/controllers/promote.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class PromoteController {
try {
if ('role' in req.body && ('id' in req.body || 'username' in req.body || 'email' in req.body)) {
const adminMod: UserModel = res.locals['user'];
const excludedRole = adminMod.role === RoleModel.ADMIN ? [RoleModel.ADMIN] : [RoleModel.ADMIN, RoleModel.MODERATOR];
const excludedRole = adminMod.role === RoleModel.MODERATOR ? [RoleModel.ADMIN] : [RoleModel.ADMIN, RoleModel.MODERATOR];
if (adminMod.role !== RoleModel.ADMIN && excludedRole.includes(req.body.role)) {
throw new HttpException({
info: '🙄 403 - Promote API :: Authorisasi Pengguna Gagal 😪',
Expand Down

0 comments on commit 4df0d9f

Please sign in to comment.