refactor: remove can_sudo from department create/edit flow
This commit is contained in:
+3
-4
@@ -1067,14 +1067,14 @@ export const api = {
|
||||
request<{ departments: Department[]; count: number }>(`/organizations/${orgId}/departments`, {}, true, requestConfig),
|
||||
|
||||
// Create department
|
||||
createDepartment: (orgId: string, name: string, description?: string, canSudo?: boolean, requestConfig?: RequestConfig) =>
|
||||
createDepartment: (orgId: string, name: string, description?: string, requestConfig?: RequestConfig) =>
|
||||
request<{ department: Department }>(`/organizations/${orgId}/departments`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ name, description, can_sudo: canSudo }),
|
||||
body: JSON.stringify({ name, description }),
|
||||
}, true, requestConfig),
|
||||
|
||||
// Update department
|
||||
updateDepartment: (orgId: string, deptId: string, data: { name?: string; description?: string; can_sudo?: boolean }, requestConfig?: RequestConfig) =>
|
||||
updateDepartment: (orgId: string, deptId: string, data: { name?: string; description?: string }, requestConfig?: RequestConfig) =>
|
||||
request<{ department: Department }>(`/organizations/${orgId}/departments/${deptId}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(data),
|
||||
@@ -1780,7 +1780,6 @@ export interface Department {
|
||||
organization_id: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
can_sudo: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
deleted_at: string | null;
|
||||
|
||||
Reference in New Issue
Block a user