完成BlogApi

This commit is contained in:
2025-05-18 14:29:42 +08:00
parent dccc703ccd
commit 44594bf1b1
5 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import { Blog } from "@/lib/types/blog";
import fetcher from "../fetcher";
export async function get(id: string) {
return fetcher<{
id: string;
title: string;
createdAt: string;
content: string;
}>(`/api/blog/${id}`);
}