MCPcopy
hub / github.com/diegohaz/rest / login

Function login

generators/app/templates/api/auth/controller.js:4–8  ·  view source on GitHub ↗
({ user }, res, next)

Source from the content-addressed store, hash-verified

2import { success } from '../../services/response/'
3
4export const login = ({ user }, res, next) =>
5 sign(user.id)
6 .then((token) => ({ token, user: user.view(true) }))
7 .then(success(res, 201))
8 .catch(next)

Callers

nothing calls this directly

Calls 2

signFunction · 0.90
successFunction · 0.90

Tested by

no test coverage detected