diff --git a/app/apis/common/get-news.ts b/app/apis/common/get-news.ts index 186bd08..a06611e 100644 --- a/app/apis/common/get-news.ts +++ b/app/apis/common/get-news.ts @@ -23,10 +23,13 @@ export const newsResponseSchema = z.object({ created_at: z.string(), updated_at: z.string(), author: authorSchema, - views: z.number(), }) const dataResponseSchema = z.object({ - data: z.array(newsResponseSchema), + data: z.array( + newsResponseSchema.extend({ + views: z.number(), + }), + ), }) export type TNewsResponse = z.infer