added get users admin only endpoint

This commit is contained in:
2026-01-13 18:29:46 +03:00
parent d2334181a0
commit 8e385887de
7 changed files with 132 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
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);
}
}
}