aloux-iam 0.0.47 → 0.0.49

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.
@@ -19,9 +19,16 @@ self.searchEmail = async (email, banCode) => {
19
19
  response.name = userLogin.name
20
20
  response.email = true
21
21
 
22
- if(banCode === true){
22
+ if(banCode.toString() === 'true'){
23
23
  const code = await self.generatecode()
24
24
  await self.sendcodemailLogin(userLogin.email, code)
25
+
26
+ userLogin.validateKey.resetPassword.resetCode = code
27
+ let time = new Date()
28
+ const sumarMinutos = new Date(time.getTime() + 5 * 60000)
29
+ userLogin.validateKey.limitCodeTime = (new Date(sumarMinutos)).getTime()
30
+
31
+ await userLogin.save()
25
32
  }
26
33
 
27
34
  return response
package/lib/swagger.yaml CHANGED
@@ -31,7 +31,7 @@ paths:
31
31
  example: developer@aloux.mx
32
32
  code:
33
33
  description: code
34
- type: boolean
34
+ type: string
35
35
  example: true
36
36
  required:
37
37
  - email
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aloux-iam",
3
- "version": "0.0.47",
3
+ "version": "0.0.49",
4
4
  "description": "Aloux IAM for APIs ",
5
5
  "main": "index.js",
6
6
  "scripts": {