File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -179,24 +179,39 @@ export const getRecommendedModulesRequestParams = z.object({
179179 referenceId : z . string ( ) ,
180180} ) ;
181181export const getRecommendedModulesResponse = z . array (
182- recommendedModule . extend ( {
183- items : z . array (
184- recommendedItem . extend ( {
185- series : series
186- . extend ( {
187- episodes : z . array ( episode . extend ( { } ) ) ,
188- } )
189- . nullable ( ) ,
190- episode : episode
191- . extend ( {
192- series : series . extend ( {
193- episodes : z . array ( episode . extend ( { } ) ) ,
194- } ) ,
195- } )
196- . nullable ( ) ,
197- } ) ,
198- ) ,
199- } ) ,
182+ recommendedModule
183+ . pick ( {
184+ id : true ,
185+ title : true ,
186+ type : true ,
187+ } )
188+ . extend ( {
189+ items : z . array (
190+ recommendedItem . extend ( {
191+ series : series
192+ . pick ( {
193+ id : true ,
194+ title : true ,
195+ thumbnailUrl : true ,
196+ } )
197+ . nullable ( ) ,
198+ episode : episode
199+ . pick ( {
200+ id : true ,
201+ description : true ,
202+ thumbnailUrl : true ,
203+ title : true ,
204+ premium : true ,
205+ } )
206+ . extend ( {
207+ series : series . pick ( {
208+ title : true ,
209+ } ) ,
210+ } )
211+ . nullable ( ) ,
212+ } ) ,
213+ ) ,
214+ } ) ,
200215) ;
201216
202217// POST /signIn
Original file line number Diff line number Diff line change @@ -470,6 +470,11 @@ export async function registerApi(app: FastifyInstance): Promise<void> {
470470 const database = getDatabase ( ) ;
471471
472472 const modules = await database . query . recommendedModule . findMany ( {
473+ columns : {
474+ id : true ,
475+ title : true ,
476+ type : true ,
477+ } ,
473478 orderBy ( module , { asc } ) {
474479 return asc ( module . order ) ;
475480 } ,
@@ -483,23 +488,24 @@ export async function registerApi(app: FastifyInstance): Promise<void> {
483488 } ,
484489 with : {
485490 series : {
486- with : {
487- episodes : {
488- orderBy ( episode , { asc } ) {
489- return asc ( episode . order ) ;
490- } ,
491- } ,
491+ columns : {
492+ id : true ,
493+ title : true ,
494+ thumbnailUrl : true ,
492495 } ,
493496 } ,
494497 episode : {
498+ columns : {
499+ id : true ,
500+ description : true ,
501+ thumbnailUrl : true ,
502+ title : true ,
503+ premium : true ,
504+ } ,
495505 with : {
496506 series : {
497- with : {
498- episodes : {
499- orderBy ( episode , { asc } ) {
500- return asc ( episode . order ) ;
501- } ,
502- } ,
507+ columns : {
508+ title : true ,
503509 } ,
504510 } ,
505511 } ,
You can’t perform that action at this time.
0 commit comments