Some middlewares

This commit is contained in:
Vins 2024-04-02 16:07:55 +02:00
parent 90486335b8
commit 860ab20b0f

View File

@ -1,4 +1,5 @@
import authHandler from "@App/middlewares/AuthHandler";
import roleHandler from "@App/middlewares/RolesHandler";
import ApiController from "@Common/system/controller-pattern/ApiController";
import { Controller, Post } from "@ControllerPattern/index";
import StripeService from "@Services/common/StripeService/StripeService";
@ -17,7 +18,7 @@ export default class StripeController extends ApiController {
/**
* @description Create a new checkout session
*/
@Post("/api/v1/admin/stripe", [authHandler])
@Post("/api/v1/admin/stripe", [authHandler, roleHandler])
protected async post(req: Request, response: Response) {
try {
//init Subscription resource with request body values