Spaces:
Sleeping
Sleeping
| import axios from "axios"; | |
| const api = axios.create({ | |
| baseURL: "/api", | |
| }); | |
| export const getRepos = () => api.get("/repos").then(r => r.data); | |
| export const addRepo = (data: { namespace: string; repo: string }) => | |
| api.post("/repos", data); | |
| export const deleteRepo = (id: string) => | |
| api.delete(`/repos/${id}`); | |
| export const getMetrics = (repoId: string, range: string) => | |
| api.get("/metrics", { params: { repoId, range } }).then(r => r.data); | |
| export const getStatus = (repoId: string) => | |
| api.get("/status", { params: { repoId } }).then(r => r.data); |