MCPcopy Create free account
hub / github.com/UnsignedInt8/LightSword / updateUser

Function updateUser

server/management/userController.ts:40–51  ·  view source on GitHub ↗
(req: express.Request, res: express.Response)

Source from the content-addressed store, hash-verified

38}
39
40export function updateUser(req: express.Request, res: express.Response) {
41 var body = req.body;
42
43 let success = App.updateUser(Number(req.params.port), body);
44 let statusCode = success ? 200 : 404;
45 let data = {
46 success,
47 msg: success ? undefined : 'User Not Found'
48 };
49
50 res.status(statusCode).json(data);
51}
52
53export function deleteUser(req: express.Request, res: express.Response) {
54 var port = Number(req.params.port);

Callers

nothing calls this directly

Calls 2

updateUserMethod · 0.80
statusMethod · 0.80

Tested by

no test coverage detected