mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 16:04:23 +00:00
Get full workspace object
This commit is contained in:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user