Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 26 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | 'use strict' |
||
2 | |||
3 | import Joi from 'joi' |
||
4 | import { sessions } from '../controllers' |
||
5 | |||
6 | export default function (server) { |
||
7 | server.post({ |
||
8 | name: 'session//post', |
||
9 | path: '/session', |
||
10 | validation: { |
||
11 | schema: { |
||
12 | body: Joi.object({ |
||
13 | payload: Joi.object({ |
||
14 | email: Joi.string() |
||
15 | .email() |
||
16 | .required(), |
||
17 | password: Joi.string() |
||
18 | .min(6) |
||
19 | .max(15) |
||
20 | .required() |
||
21 | }).required() |
||
22 | }).required() |
||
23 | } |
||
24 | } |
||
25 | }, sessions.create) // sign_in |
||
26 | } |
||
27 |