MCPcopy Create free account
hub / github.com/RemoteState/nodejs-ecs / GetAll

Method GetAll

src/controller/usersController.ts:33–43  ·  view source on GitHub ↗
(req: Request, res: Response, next: NextFunction)

Source from the content-addressed store, hash-verified

31 }
32
33 public async GetAll(req: Request, res: Response, next: NextFunction) {
34 try {
35 const users = await User.find();
36 res.status(200).send({
37 users,
38 status: 'success',
39 });
40 } catch (e) {
41 next(e);
42 }
43 }
44
45 public async CreateUser(req: Request, res: Response, next: NextFunction) {
46 try {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected