fe
This commit is contained in:
1 parent
6bca0ed00b
commit
7b207f2ccb
15 files changed
+204
-15
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import { Router } from "express";
|
||||
import BillingController from "@/controllers/BillingController.js";
|
||||
import { verifyToken } from "@/middleware/VerifyToken.js";
|
||||
|
||||
class BillingRoutes {
|
||||
private router;
|
||||
private controller;
|
||||
constructor(controller: BillingController) {
|
||||
this.router = Router();
|
||||
this.controller = controller;
|
||||
this.initRoutes();
|
||||
}
|
||||
|
||||
initRoutes = () => {
|
||||
this.router.get("/plans", verifyToken, this.controller.listPlans);
|
||||
this.router.post("/subscribe", verifyToken, this.controller.subscribePlan);
|
||||
};
|
||||
|
||||
getRouter() {
|
||||
return this.router;
|
||||
}
|
||||
}
|
||||
|
||||
export default BillingRoutes;
|
||||
@@ -15,3 +15,4 @@ export { default as ProfileRoutes } from "./profile.js";
|
||||
export { default as IncidentsRoutes } from "./incidents.js";
|
||||
export { default as SettingsRoutes } from "./settings.js";
|
||||
export { default as MeRoutes } from "./me.js";
|
||||
export { default as BillingRoutes } from "./billing.js";
|
||||
Reference in new issue
Block a user