first commit

This commit is contained in:
2026-07-16 20:48:43 -03:00
commit 5696cee264
1111 changed files with 322270 additions and 0 deletions
@@ -0,0 +1,35 @@
import { Request, Response } from "express";
import { paginateCompanies, setCompanyBanned, updateCompany } from "../services/companies.service";
export const paginate = async (req: Request, res: Response) => {
try {
const result = await paginateCompanies(req.body);
res.json(result);
} catch (e: any) {
console.log(e);
const err = e.response ? e.response.data : e.message;
res.status(500).json({ error: err });
}
};
export const update = async (req: Request, res: Response) => {
try {
const result = await updateCompany(req.body);
res.json(result);
} catch (e: any) {
console.log(e);
const err = e.response ? e.response.data : e.message;
res.status(500).json({ error: err });
}
};
export const setBanned = async (req: Request, res: Response) => {
try {
const result = await setCompanyBanned(req.body);
res.json(result);
} catch (e: any) {
console.log(e);
const err = e.response ? e.response.data : e.message;
res.status(500).json({ error: err });
}
};