修复了几个damn的bug,终于可以用户端访问了
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import fetcher from "../fetcher";
|
||||
|
||||
export async function get(id: string) {
|
||||
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}`);
|
||||
}>(`/api/blog/${id}` + (password ? `?p=${password}` : ''));
|
||||
}
|
||||
Reference in New Issue
Block a user