feat: 实现前端资源管理
This commit is contained in:
@@ -1,19 +1,6 @@
|
||||
import { PublicResource } from "@/lib/types/resource";
|
||||
import { serverFetch } from "../server";
|
||||
|
||||
export type ResourceTagType = {
|
||||
name: string;
|
||||
type: string;
|
||||
}
|
||||
|
||||
export interface Resource {
|
||||
id: string;
|
||||
title: string;
|
||||
description: string;
|
||||
imageUrl: string;
|
||||
link: string;
|
||||
tags: ResourceTagType[];
|
||||
}
|
||||
|
||||
export async function list() {
|
||||
return serverFetch<Resource[]>('/api/resource')
|
||||
return serverFetch<PublicResource[]>('/api/resource')
|
||||
}
|
||||
Reference in New Issue
Block a user