feat: overhaul groups management, remove global team_admin and isolate group administration
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m2s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m2s
This commit is contained in:
1 parent
60c302e23e
commit
e37302f73c
11 files changed
+936
-388
No files matched your search
@@ -723,6 +723,13 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
async updateTeam(teamId: string, name: string, description = ''): Promise<Team> {
|
||||
return request<Team>(`/api/v1/teams/${teamId}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ name, description }),
|
||||
});
|
||||
},
|
||||
|
||||
async deleteTeam(teamId: string): Promise<void> {
|
||||
await request(`/api/v1/teams/${teamId}`, { method: 'DELETE' });
|
||||
},
|
||||
@@ -742,6 +749,17 @@ export const api = {
|
||||
});
|
||||
},
|
||||
|
||||
async updateTeamMemberRole(
|
||||
teamId: string,
|
||||
userId: string,
|
||||
role: 'admin' | 'member'
|
||||
): Promise<void> {
|
||||
await request(`/api/v1/teams/${teamId}/members/${userId}`, {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ role }),
|
||||
});
|
||||
},
|
||||
|
||||
async removeTeamMember(teamId: string, userId: string): Promise<void> {
|
||||
await request(`/api/v1/teams/${teamId}/members/${userId}`, { method: 'DELETE' });
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user