Open sigaloid opened 1 year ago
GET */workspaces
-> Return all workspacesGET */workspaces/[id]
-> Return workspace info (name, contents, users?)POST */workspaces/[id]/add
-> Send javascript array of result ID's, add to workspace.POST */workspaces/[id]/remove
-> Send javascript of result ID's, remove from workspace.POST */workspaces/[id]/create
-> Send javascript object with workspace name, password (?), etc. Create new workspace.POST */workspaces/[id]/join
-> Send password, add user to workspacePOST */workspaces/[id]/leave
-> Send no content, remove user from workspaceFront end, please add on to this if necessary!
For rendering workspaces here is some of the information that would need to be passed back -> front for each individual workspace:
We might want to talk about what exactly we want security looks like - what does it means when a user successfully joins a workspace?
For rendering individual workspaces, here is what is needed for each article:
Just in general for frontend people, there is a set up for how this could be done on lines 118-135 in Results.jsx
The skeleton fetch requests in place right now (please feel free to add to this!)
Workspaces.jsx:
Right now I have it passing in the user name of the current user in the header. I am not sure if that would be needed. Needs to return information detailed above.
Right now: I have it passing in the workspace name and password.
3.executeCreate: Responsible for sending information about a workspace someone is trying to create. Guaranteed through validation to always have a name and password set by the user.
Right now: I have it passing in the workspace name and password.
indvidualWorkspacePage.jsx: Responsible for getting the information about each articles in an individual workspace.
Right now I have it sending the workspace name and the user name (?) in the header. Needs to return information detailed above.
Results.jsx:
handleGetWorkspaces: responsible for getting the list of workspaces the user has (edit) access to.
handleAddtoWorkspace: responsible for adding the array of selected article ids to the selected workspace (workspace-id in the url)
Workspaces.jsx:
GET */workspaces
-> Return all workspaces
Something I need to know is whether this returns JSONobj.workspaces
(all workspaces) and JSONobj.count
(number of workspaces) like in queries (count is used in the DataGrid), or is the JSONobj
itself the array/list of all workspaces?
I don't think count is needed, so either way is fine.