@modernlock/common 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Request, Response, NextFunction } from "express";
|
|
2
2
|
type Role = "client" | "owner" | "superAdmin" | "developer" | "supportAgent";
|
|
3
|
-
declare const verifyPermission: (role: Role) => (req: Request, res: Response, next: NextFunction) => void;
|
|
4
|
-
export
|
|
3
|
+
export declare const verifyPermission: (role: Role) => (req: Request, res: Response, next: NextFunction) => void;
|
|
4
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyPermission = void 0;
|
|
3
4
|
const auth_error_1 = require("../errors/auth-error");
|
|
4
5
|
const verifyPermission = (role) => {
|
|
5
6
|
return (req, res, next) => {
|
|
@@ -8,4 +9,4 @@ const verifyPermission = (role) => {
|
|
|
8
9
|
next();
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
|
-
exports.
|
|
12
|
+
exports.verifyPermission = verifyPermission;
|