@riocrypto/common-server 1.0.687 → 1.0.689
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.
|
@@ -41,11 +41,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
41
41
|
const apiKey = req.header("x-api-key");
|
|
42
42
|
if (apiKey) {
|
|
43
43
|
try {
|
|
44
|
+
console.log("x-api-key is ", apiKey);
|
|
44
45
|
const hashedApiKey = yield apiKey_1.ApiKey.toHash(apiKey);
|
|
45
46
|
const Auth = yield (0, auth_1.buildAuth)(mongoose);
|
|
46
47
|
const auth = yield Auth.findOne({
|
|
47
48
|
"apiKeys.value": hashedApiKey,
|
|
48
49
|
});
|
|
50
|
+
console.log(auth);
|
|
49
51
|
if (auth) {
|
|
50
52
|
const missing = [];
|
|
51
53
|
if (!auth.password) {
|
|
@@ -59,10 +61,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
59
61
|
phoneNumber: auth.phoneNumber,
|
|
60
62
|
missing,
|
|
61
63
|
};
|
|
64
|
+
console.log(payload);
|
|
62
65
|
req.currentAuth = payload;
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
catch (err) {
|
|
68
|
+
catch (err) {
|
|
69
|
+
console.log(err);
|
|
70
|
+
}
|
|
66
71
|
}
|
|
67
72
|
else if ((_a = req.cookies) === null || _a === void 0 ? void 0 : _a.accessToken) {
|
|
68
73
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.689",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.626",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|