14 lines
322 B
TypeScript
14 lines
322 B
TypeScript
import fetcher from "@/lib/api/fetcher";
|
|
|
|
type UpdateBlogParams = {
|
|
title: string;
|
|
description: string;
|
|
contentUrl: string;
|
|
}
|
|
|
|
export async function update(id: string, data: UpdateBlogParams) {
|
|
return fetcher(`/api/admin/web/blog/${id}`, {
|
|
method: 'PUT',
|
|
body: JSON.stringify(data)
|
|
})
|
|
} |