라벨명 표시기능
This commit is contained in:
@@ -6,8 +6,22 @@ import { AuthenticatedRequest } from "../types/auth";
|
||||
export const getScreens = async (req: AuthenticatedRequest, res: Response) => {
|
||||
try {
|
||||
const { companyCode } = req.user as any;
|
||||
const screens = await screenManagementService.getScreens(companyCode);
|
||||
res.json({ success: true, data: screens });
|
||||
const { page = 1, size = 20, searchTerm } = req.query;
|
||||
|
||||
const result = await screenManagementService.getScreensByCompany(
|
||||
companyCode,
|
||||
parseInt(page as string),
|
||||
parseInt(size as string)
|
||||
);
|
||||
|
||||
res.json({
|
||||
success: true,
|
||||
data: result.data,
|
||||
total: result.pagination.total,
|
||||
page: result.pagination.page,
|
||||
size: result.pagination.size,
|
||||
totalPages: result.pagination.totalPages,
|
||||
});
|
||||
} catch (error) {
|
||||
console.error("화면 목록 조회 실패:", error);
|
||||
res
|
||||
|
||||
Reference in New Issue
Block a user