"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rolesEndpointsRouter = void 0;
const roles_endpoint_controller_1 = require("../controllers/roles-endpoint.controller");
const roles_endpoint_validator_1 = require("../validators/roles-endpoint.validator");
const abstract_route_1 = require("./abstract.route");
const express = require("express");
const router = express.Router();
const controller = new roles_endpoint_controller_1.RolesEndpointsController();
class RolesEndpointsRoute extends abstract_route_1.AbstractRoute {
    constructor(_controller, _router) {
        super(_controller, _router, new roles_endpoint_validator_1.RolesEndpointsValidator());
        this.customMethods = ["setPermissions", "avoidCheck"];
    }
    setPermissions() {
        this.router.post("/set-permissions/:id", this.validator.setPermissions(), this.controller.setPermissions.bind(this.controller));
    }
    avoidCheck() {
        this.router.post("/avoid-check/:id", this.validator.avoidCheck(), this.controller.avoidCheck.bind(this.controller));
    }
}
exports.rolesEndpointsRouter = new RolesEndpointsRoute(controller, router).init();
