From 9472792d0d1253c13d4a4d807a32af62f194d9b4 Mon Sep 17 00:00:00 2001 From: Alma Date: Thu, 10 Apr 2025 22:13:45 +0200 Subject: [PATCH] delete user leantime api 10 --- app/api/users/route.ts | 46 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/app/api/users/route.ts b/app/api/users/route.ts index 1ccad0b8..f0eceae1 100644 --- a/app/api/users/route.ts +++ b/app/api/users/route.ts @@ -230,35 +230,33 @@ async function createLeantimeUser(userData: { id: 1, params: { values: { - firstname: userData.firstName, + '0': 0, // This will be set by Leantime + '1': userData.lastName, + '2': userData.firstName, + '3': leantimeRole, + '4': '', // profileId + '5': 'a', // status + '6': userData.email, + '7': 0, // twoFAEnabled + '8': 0, // clientId + '9': null, // clientName + '10': '', // jobTitle + '11': '', // jobLevel + '12': '', // department + '13': new Date().toISOString(), // modified lastname: userData.lastName, - email: userData.email, - password: userData.password, - status: 'active', + firstname: userData.firstName, role: leantimeRole, - phone: '', + profileId: '', + status: 'a', + username: userData.email, + twoFAEnabled: 0, + clientId: 0, + clientName: null, jobTitle: '', jobLevel: '', department: '', - clientId: 0, - source: 'keycloak', - pwReset: false, - lastlogin: null, - created: new Date().toISOString(), - modified: new Date().toISOString(), - notifications: 1, - settings: '{}', - twoFAEnabled: false, - twoFASecret: null, - profileId: null, - expires: null, - session: null, - sessiontime: null, - wage: null, - hours: null, - description: null, - forcePwReset: false, - lastpwd_change: null + modified: new Date().toISOString() } } })