Skip to content

Commit bed8cf9

Browse files
author
Ahmed Elghareeb
committed
refactor: fix function name (follow convention)
1 parent 984cdad commit bed8cf9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

web/backend/src/authManager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function assignUserPermissionToOwnElection(userID: string, ElectionID: st
6161
authEnforcer.addPolicy(userID, ElectionID, PERMISSIONS.ACTIONS.OWN);
6262
}
6363

64-
export function RevokeUserPermissionToOwnElection(userID: string, ElectionID: string) {
64+
export function revokeUserPermissionToOwnElection(userID: string, ElectionID: string) {
6565
authEnforcer.removePolicy(userID, ElectionID, PERMISSIONS.ACTIONS.OWN);
6666
}
6767

web/backend/src/controllers/dela.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
assignUserPermissionToOwnElection,
88
isAuthorized,
99
PERMISSIONS,
10-
RevokeUserPermissionToOwnElection,
10+
revokeUserPermissionToOwnElection,
1111
} from '../authManager';
1212

1313
export const delaRouter = express.Router();
@@ -220,7 +220,7 @@ delaRouter.delete('/forms/:formID', (req, res) => {
220220
.status(500)
221221
.send(`failed to proxy request: ${req.method} ${uri} - ${error.message} - ${resp}`);
222222
});
223-
RevokeUserPermissionToOwnElection(String(req.session.userId), formID);
223+
revokeUserPermissionToOwnElection(String(req.session.userId), formID);
224224
});
225225

226226
// This API call is used redirect all the calls for DELA to the DELAs nodes.

0 commit comments

Comments
 (0)