@aeriajs/builtins 0.0.234 → 0.0.235
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.
|
@@ -45,11 +45,6 @@ const redefinePassword = async (payload, context) => {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
if (!password) {
|
|
48
|
-
/* if( context.request.method === 'GET' ) {
|
|
49
|
-
return context.response.writeHead(302, {
|
|
50
|
-
location: `/user/activation?step=password&u=${userId}&t=${token}`,
|
|
51
|
-
}).end()
|
|
52
|
-
} */
|
|
53
48
|
return context.error(types_1.HTTPStatus.UnprocessableContent, {
|
|
54
49
|
code: types_1.ACError.MalformedInput,
|
|
55
50
|
});
|
|
@@ -51,17 +51,14 @@ export const redefinePassword = async (payload, context) => {
|
|
|
51
51
|
code: ACError.MalformedInput
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
await context.collection.model.updateOne(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
active: true,
|
|
61
|
-
password: await bcrypt.hash(password, 10)
|
|
62
|
-
}
|
|
54
|
+
await context.collection.model.updateOne({
|
|
55
|
+
_id: user._id
|
|
56
|
+
}, {
|
|
57
|
+
$set: {
|
|
58
|
+
active: true,
|
|
59
|
+
password: await bcrypt.hash(password, 10)
|
|
63
60
|
}
|
|
64
|
-
);
|
|
61
|
+
});
|
|
65
62
|
return Result.result({
|
|
66
63
|
userId: user._id
|
|
67
64
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/builtins",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.235",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"mongodb": "^6.5.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@aeriajs/core": "^0.0.
|
|
49
|
-
"@aeriajs/common": "^0.0.
|
|
50
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
51
|
-
"@aeriajs/types": "^0.0.
|
|
52
|
-
"@aeriajs/validation": "^0.0.
|
|
48
|
+
"@aeriajs/core": "^0.0.235",
|
|
49
|
+
"@aeriajs/common": "^0.0.133",
|
|
50
|
+
"@aeriajs/entrypoint": "^0.0.137",
|
|
51
|
+
"@aeriajs/types": "^0.0.115",
|
|
52
|
+
"@aeriajs/validation": "^0.0.149"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"test": "echo skipping",
|