♻️ refactor: restructure banner select payload
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user