first commit

This commit is contained in:
2026-05-23 14:14:50 +03:30
commit 2a22bab127
48 changed files with 7554 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import { NextFunction } from "express";
import { ServerResponse } from "../../../core/types";
import { Controller } from "../../../core/controller/main.controller";
import UserService from "../services/user.service";
class UserControllerClass extends Controller {
#service;
constructor() {
super();
this.#service = UserService;
}
async getAll(req: any, res: ServerResponse, next: NextFunction) {
try {
const data = await this.#service.getAll();
return res.status(200).json({
status: 200,
data,
message: "Ok",
});
} catch (error) {
console.log(error);
next(error);
}
}
}
const UserController = new UserControllerClass();
export default UserController;