修复了几个damn的bug,终于可以用户端访问了

This commit is contained in:
2025-06-23 01:12:25 +08:00
parent d2a54b062f
commit 617602b1a6
3 changed files with 17 additions and 8 deletions

View File

@@ -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}` : ''));
}