@devmoods/express-extras 0.22.0 → 0.22.1
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.
- package/dist/auth.js +2 -3
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -69,8 +69,7 @@ export function createAuth({ getUserByToken, methods: { emailAndPassword }, filt
|
|
|
69
69
|
properties: { token: tokenSchema, password: passwordSchema },
|
|
70
70
|
required: ['token', 'password'],
|
|
71
71
|
}), route(async (req) => {
|
|
72
|
-
const { password } = req.body;
|
|
73
|
-
const { token } = req.params;
|
|
72
|
+
const { password, token } = req.body;
|
|
74
73
|
const email = await redis.get(token);
|
|
75
74
|
if (!email) {
|
|
76
75
|
logger.info('invalid reset token', { token });
|
|
@@ -117,7 +116,7 @@ export function createAuth({ getUserByToken, methods: { emailAndPassword }, filt
|
|
|
117
116
|
properties: { token: tokenSchema },
|
|
118
117
|
required: ['token'],
|
|
119
118
|
}), route(async (req) => {
|
|
120
|
-
const token = req.params
|
|
119
|
+
const { token } = req.params;
|
|
121
120
|
const email = await redis.get(token);
|
|
122
121
|
if (!email) {
|
|
123
122
|
logger.info('invalid reset token', { token });
|