From a7196ad613e19dfc05d524c20648cfd7e85b7336 Mon Sep 17 00:00:00 2001 From: "marcel.kocisek" Date: Thu, 16 Jan 2025 11:38:36 +0100 Subject: [PATCH] Fix: Update interface for update user to make is_admin and is_active as non required --- web-app/packages/admin-lib/src/modules/admin/types.ts | 4 ++-- .../admin-lib/src/modules/admin/views/AccountDetailView.vue | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/web-app/packages/admin-lib/src/modules/admin/types.ts b/web-app/packages/admin-lib/src/modules/admin/types.ts index f0000b8b..2c3bc54d 100644 --- a/web-app/packages/admin-lib/src/modules/admin/types.ts +++ b/web-app/packages/admin-lib/src/modules/admin/types.ts @@ -19,8 +19,8 @@ export interface UsersParams extends PaginatedRequestParams { export type UsersResponse = PaginatedResponse export interface UpdateUserData { - is_admin: boolean - active: boolean + is_admin?: boolean + active?: boolean } export interface CreateUserData { diff --git a/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue b/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue index 9032e85b..fa2bd6e0 100644 --- a/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue +++ b/web-app/packages/admin-lib/src/modules/admin/views/AccountDetailView.vue @@ -215,8 +215,7 @@ const changeStatusDialog = () => { await adminStore.updateUser({ username: user.value.username, data: { - active: !user.value.active, - is_admin: user.value.is_admin + active: !user.value.active } }) } @@ -283,7 +282,6 @@ const switchAdminAccess = async () => { await adminStore.updateUser({ username: user.value.username, data: { - active: user.value.active, is_admin: !user.value.is_admin } })