feat: 优化项目目录结构
This commit is contained in:
13
apps/frontend/lib/api/blog/get.ts
Normal file
13
apps/frontend/lib/api/blog/get.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import fetcher from "../fetcher";
|
||||
|
||||
export async function get(id: string, option: {
|
||||
password?: string;
|
||||
} = {}) {
|
||||
const { password } = option;
|
||||
return fetcher<{
|
||||
id: string;
|
||||
title: string;
|
||||
createdAt: string;
|
||||
content: string;
|
||||
}>(`/api/blog/${id}` + (password ? `?p=${password}` : ''));
|
||||
}
|
||||
Reference in New Issue
Block a user