Get full workspace object

This commit is contained in:
2024-10-21 23:48:50 +02:00
parent 749461f11b
commit ffe82b335a
3 changed files with 11 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ const apiCall = async (url, options = {}) => {
}
};
export const fetchLastWorkspace = async () => {
export const fetchLastWorkspaceId = async () => {
const response = await apiCall(`${API_BASE_URL}/users/1/workspaces/last`);
return response.json();
};
@@ -59,6 +59,13 @@ export const deleteFile = async (workspaceId, filePath) => {
return response.text();
};
export const getWorkspace = async (workspaceId) => {
const response = await apiCall(
`${API_BASE_URL}/users/1/workspaces/${workspaceId}`
);
return response.json();
};
export const fetchWorkspaceSettings = async (workspaceId) => {
const response = await apiCall(
`${API_BASE_URL}/users/1/workspaces/${workspaceId}/settings`