Skip to content

Commit

Permalink
Merge pull request #179 from Shabzynana/feat/132-update_organisaion_s…
Browse files Browse the repository at this point in the history
…uperAdmin

Feat/132 update organisaion super admin
  • Loading branch information
Idimmusix authored Jul 23, 2024
2 parents cf5f137 + fa19a73 commit 87103b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/AdminController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ class AdminOrganisationController {
}
}

export default AdminOrganisationController;
export default { AdminOrganisationController };
5 changes: 3 additions & 2 deletions src/routes/admin.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Router } from "express";
import AdminOrganisationController from "../controllers/AdminController";
import admin from "../controllers/AdminController";
import { authMiddleware, checkPermissions, } from "../middleware";
import { UserRole } from "../enums/userRoles";

const adminRouter = Router();
const adminOrganisationController = new AdminOrganisationController();
const adminOrganisationController = new admin.AdminOrganisationController();

adminRouter.patch("/organisation/:id", authMiddleware,
checkPermissions([UserRole.SUPER_ADMIN]),
adminOrganisationController.updateOrg.bind(adminOrganisationController));


export { adminRouter };

0 comments on commit 87103b0

Please sign in to comment.