feat: update TNewsResponse type to TNewsResponseData for improved data structure

This commit is contained in:
Ardeman 2025-03-20 12:40:20 +08:00
parent 731b36ef70
commit 09f8669553
2 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ const dataResponseSchema = z.object({
}) })
export type TNewsResponse = z.infer<typeof newsResponseSchema> export type TNewsResponse = z.infer<typeof newsResponseSchema>
export type TNewsResponseData = z.infer<typeof dataResponseSchema>
export type TAuthorResponse = z.infer<typeof authorSchema> export type TAuthorResponse = z.infer<typeof authorSchema>
type TParameters = { type TParameters = {
categories?: string[] categories?: string[]

View File

@ -1,7 +1,7 @@
import type { TNewsResponse } from '~/apis/common/get-news' import type { TNewsResponseData } from '~/apis/common/get-news'
export type TNews = { export type TNews = {
title: string title: string
description: string description: string
items: Promise<{ data: TNewsResponse[] }> items: Promise<TNewsResponseData>
} }