Explorar el Código

authentication model

tags/0.0.1^2
diaseu hace 3 años
padre
commit
d8f16442cd
Se han modificado 2 ficheros con 15 adiciones y 1 borrados
  1. 14
    0
      backend/lib/models/authentication.js
  2. 1
    1
      backend/lib/schemas/authentication.js

+ 14
- 0
backend/lib/models/authentication.js Ver fichero

@@ -0,0 +1,14 @@
1
+const Schwifty = require('@hapipal/schwifty')
2
+const Joi = require('joi')
3
+
4
+module.exports = class userAuth extends Schwifty.Model {
5
+    static get tableName() {
6
+        return 'authentication'
7
+    }
8
+    static get joiSchema() {
9
+        return Joi.object({
10
+            user_email: Joi.string().required(),
11
+            token: Joi.string().required()
12
+        })
13
+    }
14
+}

+ 1
- 1
backend/lib/schemas/authentication.js Ver fichero

@@ -6,7 +6,7 @@ const userAuth = Joi.object({
6 6
     user_email: Joi.string(),
7 7
     created_at: Joi.date(),
8 8
     updated_at: Joi.date(),
9
-    saltedhash: Joi.string()
9
+    token: Joi.string()
10 10
 }).label('user_auth')
11 11
 
12 12
 module.exports = {

Loading…
Cancelar
Guardar