@riocrypto/common-server 1.0.1503 → 1.0.1504
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.
|
@@ -18,10 +18,7 @@ const adminRoleOrder = [
|
|
|
18
18
|
];
|
|
19
19
|
const requireMinAdminRole = (req, res, next, minRole) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
20
|
var _a;
|
|
21
|
-
if (
|
|
22
|
-
throw new common_1.AdminOnlyError();
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
21
|
+
if (req.adminAuth) {
|
|
25
22
|
if (adminRoleOrder.indexOf((_a = req.adminAuth) === null || _a === void 0 ? void 0 : _a.role) <
|
|
26
23
|
adminRoleOrder.indexOf(minRole)) {
|
|
27
24
|
throw new common_1.GenericInputError(`Insufficient permissions. This endpoint requires at least the ${minRole} role. Contact Javier to change your access role.`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1504",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
29
|
"@google-cloud/vision": "^4.0.2",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.4.2",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.1348",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^0.27.2",
|
|
34
34
|
"ccxt": "^3.0.30",
|