15 lines
543 B
JavaScript
15 lines
543 B
JavaScript
import axios from "axios";
|
|
import { LOCAL_SERVER_URL } from "../config/index.js";
|
|
|
|
export async function fetchProjectInfo(projectName) {
|
|
const response = await axios.get(`${LOCAL_SERVER_URL}/api/mcp/project-info`, {
|
|
params: { project: projectName }
|
|
});
|
|
return response.data; // { success, web_url, token, tokenHash, domain, project_dir }
|
|
}
|
|
|
|
export async function fetchProjectsList() {
|
|
const response = await axios.get(`${LOCAL_SERVER_URL}/api/mcp/projects`);
|
|
return response.data; // { success, projects: [...] }
|
|
}
|