添加 RSS 能力
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-04-01 02:24:30 +08:00
parent 706e98e39d
commit 4e56bc0d38
6 changed files with 134 additions and 15 deletions

View File

@ -1,5 +1,20 @@
import { legacyClient } from '../clients'
export type ListBlogItemType = {
id: number
title: string
/** ISO8601 */
created_at: string
/** ISO8601 */
updated_at: string
featured_image: null | {
image_url: string
}
}
export const listBlogs = async ({
page = 1,
limit = 20,
@ -8,13 +23,7 @@ export const listBlogs = async ({
limit?: number
}) => {
const resp = await legacyClient.post('/v1/blog/list', { page, limit })
return resp.data.data as {
id: number
title: string
featured_image: null | {
image_url: string
}
}[]
return resp.data.data as ListBlogItemType[]
}
export const getBlog: (