forked from arayabrain/barebone-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-main' into feature/database_share
# Conflicts: # frontend/src/components/Database/DatabaseCells.tsx # frontend/src/pages/Workspace/index.tsx
- Loading branch information
Showing
19 changed files
with
859 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import axios from 'utils/axios' | ||
import qs from 'qs' | ||
import { ItemsWorkspace, WorkspaceDataDTO } from 'store/slice/Workspace/WorkspaceType' | ||
|
||
export type WorkspacePostDataDTO = { name: string; id?: number } | ||
|
||
export const getWorkspacesApi = async (params: { [key: string]: number }): Promise<WorkspaceDataDTO> => { | ||
const paramsNew = qs.stringify(params, { indices: false }) | ||
const response = await axios.get(`/workspaces?${paramsNew}`) | ||
return response.data | ||
} | ||
|
||
export const delWorkspaceApi = async (id: number): Promise<boolean> => { | ||
const response = await axios.delete(`/workspace/${id}`) | ||
return response.data | ||
} | ||
|
||
export const postWorkspaceApi = async ( | ||
data: WorkspacePostDataDTO, | ||
): Promise<ItemsWorkspace> => { | ||
const response = await axios.post(`/workspace`, data) | ||
return response.data | ||
} | ||
|
||
export const putWorkspaceApi = async ( | ||
data: WorkspacePostDataDTO, | ||
): Promise<ItemsWorkspace> => { | ||
const response = await axios.put(`/workspace/${data.id}`, { name: data.name }) | ||
return response.data | ||
} | ||
|
||
export const importWorkspaceApi = async ( | ||
data: Object, | ||
): Promise<ItemsWorkspace> => { | ||
const response = await axios.post(`/workspace/import`, { todo_dummy: data }) | ||
return response.data | ||
} | ||
|
||
export const exportWorkspaceApi = async (id: number): Promise<void> => { | ||
const response = await axios.get(`/workspace/export/${id}`) | ||
return response.data | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export type UserDTO = { | ||
id: number | ||
uid: string | ||
email: string | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.