feat: project list
This commit is contained in:
16
apps/web/src/pages/project/service.ts
Normal file
16
apps/web/src/pages/project/service.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { net, type APIResponse } from "@shared";
|
||||
import type { Project } from "./types";
|
||||
|
||||
|
||||
class ProjectService {
|
||||
|
||||
async list() {
|
||||
const { data } = await net.request<APIResponse<Project[]>>({
|
||||
method: 'GET',
|
||||
url: '/api/project/list',
|
||||
})
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
export const projectService = new ProjectService();
|
||||
Reference in New Issue
Block a user