refactor: remove can_sudo from department create/edit flow

This commit is contained in:
2026-06-05 15:29:49 +00:00
parent 0bc18364d4
commit 7aa550f62a
2 changed files with 10 additions and 41 deletions
+3 -4
View File
@@ -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;