@modernlock/common 1.0.66 → 1.0.67

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 = "superAdmin" | "developer" | "supportAgent";
3
- declare const verifyPermission: (role: Role[]) => (req: Request, res: Response, next: NextFunction) => void;
4
- export { verifyPermission };
3
+ declare const verifyAdminPermission: (role: Role[]) => (req: Request, res: Response, next: NextFunction) => void;
4
+ export { verifyAdminPermission };
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verifyPermission = void 0;
3
+ exports.verifyAdminPermission = void 0;
4
4
  const authorization_error_1 = require("../errors/authorization-error");
5
- const verifyPermission = (role) => {
5
+ const verifyAdminPermission = (role) => {
6
6
  return (req, res, next) => {
7
7
  var _a;
8
8
  // if (!role.includes(req.user.role)) throw new AuthenticationError();
@@ -12,4 +12,4 @@ const verifyPermission = (role) => {
12
12
  next();
13
13
  };
14
14
  };
15
- exports.verifyPermission = verifyPermission;
15
+ exports.verifyAdminPermission = verifyAdminPermission;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modernlock/common",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [