fix(web): connect project context in media flow
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled

This commit is contained in:
Xiaoxia AI
2026-06-21 21:48:21 +08:00
parent 1a9d862584
commit 59291b0e8f
7 changed files with 238 additions and 43 deletions
+24
View File
@@ -0,0 +1,24 @@
import apiClient from './client';
export interface ProjectItem {
id: string;
workspace_id: string;
name: string;
description: string;
}
export interface CreateProjectRequest {
workspace_id: string;
name: string;
description?: string;
}
export const getProjects = async (workspaceId: string): Promise<ProjectItem[]> => {
const response = await apiClient.get('/projects', { params: { workspace_id: workspaceId } });
return response.data.items;
};
export const createProject = async (data: CreateProjectRequest): Promise<ProjectItem> => {
const response = await apiClient.post('/projects', data);
return response.data;
};