完成博客、资源管理api
This commit is contained in:
19
tone-page-web/lib/api/admin/web/resrouce/create.ts
Normal file
19
tone-page-web/lib/api/admin/web/resrouce/create.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import fetcher from "@/lib/api/fetcher";
|
||||
|
||||
type CreateResourceParams = {
|
||||
title: string;
|
||||
description: string;
|
||||
imageUrl: string;
|
||||
link: string;
|
||||
tags: {
|
||||
name: string;
|
||||
type: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export async function create(data: CreateResourceParams) {
|
||||
return fetcher('/admin/web/resource', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data)
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user