MCPcopy Create free account
hub / github.com/TomDoesTech/REST-API-Tutorial / createUserHandler

Function createUserHandler

src/controller/user.controller.ts:6–14  ·  view source on GitHub ↗
(req: Request, res: Response)

Source from the content-addressed store, hash-verified

4import log from "../logger";
5
6export async function createUserHandler(req: Request, res: Response) {
7 try {
8 const user = await createUser(req.body);
9 return res.send(omit(user.toJSON(), "password"));
10 } catch (e) {
11 log.error(e);
12 return res.status(409).send(e.message);
13 }
14}

Callers

nothing calls this directly

Calls 1

createUserFunction · 0.90

Tested by

no test coverage detected