♻️ refactor: restructure banner select payload

This commit is contained in:
2026-03-25 17:49:16 +07:00
parent 26909154ab
commit dd70f9f9d4

View File

@ -20,6 +20,25 @@ export const findAllActiveHeroBannerRepository = async () => {
startDate: "asc",
},
],
select: {
orderPriority: true,
imageUrl: true,
media: {
select: {
id: true,
title: true,
slug: true,
pictureLarge: true,
synopsis: true,
genres: {
select: {
slug: true,
name: true,
},
},
},
},
},
});
} catch (error) {
throw new AppError(500, "Failed to fetch active hero banners", error);