mirror of
https://github.com/andwati/order-service.git
synced 2026-10-18 10:22:52 +00:00
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
import type { Request, Response, NextFunction } from "express";
|
|
import { UserService } from "../services/user.service.js";
|
|
|
|
export class UserController {
|
|
static async getAll(_req: Request, res: Response, next: NextFunction) {
|
|
try {
|
|
const users = await UserService.getAll();
|
|
res.status(200).json(users);
|
|
} catch (err) {
|
|
next(err);
|
|
}
|
|
}
|
|
}
|