chore: 前端调整博客结构定义
This commit is contained in:
@@ -2,5 +2,7 @@ import { Blog } from "@/lib/types/blog";
|
|||||||
import { serverFetch } from "../server";
|
import { serverFetch } from "../server";
|
||||||
|
|
||||||
export async function list() {
|
export async function list() {
|
||||||
return serverFetch<Blog[]>('/api/blog')
|
return serverFetch<Pick<Blog,
|
||||||
|
'id' | 'title' | 'description' | 'viewCount' | 'createdAt' | 'updatedAt' | 'deletedAt'
|
||||||
|
>[]>('/api/blog')
|
||||||
}
|
}
|
||||||
@@ -7,5 +7,7 @@ export interface Blog {
|
|||||||
viewCount: number;
|
viewCount: number;
|
||||||
contentUrl: string;
|
contentUrl: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
|
deletedAt: string;
|
||||||
permissions: BlogPermission[];
|
permissions: BlogPermission[];
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user