All files / routes login.js

100% Statements 13/13
100% Branches 0/0
100% Functions 1/1
100% Lines 13/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1815x 15x   15x 15x 15x   15x 15x 15x 15x 15x 15x 15x   15x    
const { Router } = require('express')
const router = Router()
 
module.exports = (crowi, app, form) => {
  const { Login } = crowi.controllers
  const { ApplicationInstalled, CsrfVerify: csrf } = crowi.middlewares
 
  router.get('/login/error/:reason', Login.error)
  router.get('/login', ApplicationInstalled, Login.login)
  router.get('/login/invited', Login.invited)
  router.post('/login/activateInvited', form.invited, csrf, Login.invited)
  router.post('/login', form.login, csrf, Login.login)
  router.get('/login/google', Login.loginGoogle)
  router.get('/login/github', Login.loginGitHub)
 
  return router
}