src/router/passwords/create.js   A
last analyzed

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 25
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
wmc 1
c 1
b 0
f 0
nc 1
mnd 0
bc 1
fnc 1
dl 0
loc 25
rs 10
bpm 1
cpm 1
noi 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A create.js ➔ ??? 0 19 1
1
'use strict'
2
3
import Joi from 'joi'
4
import passport from 'passport'
5
import { passwords } from '../../controllers'
6
7
export default function (server) {
8
  server.post({
9
    name: 'password//post',
10
    path: '/password',
11
    validation: {
12
      schema: {
13
        body: Joi.object({
14
          payload: Joi.object({
15
            email: Joi.string().email().required()
16
          }).required()
17
        }).required()
18
      }
19
    }
20
  },
21
  passport.authenticate('jwtEmptyParamUrlQueryStrategy', {
22
    session: false
23
  }),
24
  passwords.create) // recover
25
}
26