From 516e80905e4d17cfa993b34bee0b20c3d8930325 Mon Sep 17 00:00:00 2001 From: Alma Date: Thu, 10 Apr 2025 20:33:20 +0200 Subject: [PATCH] add user leantime api 3 --- app/api/users/route.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/api/users/route.ts b/app/api/users/route.ts index f1c9afbb..3f8ce4dc 100644 --- a/app/api/users/route.ts +++ b/app/api/users/route.ts @@ -206,6 +206,7 @@ async function createLeantimeUser(userData: { firstName: string; lastName: string; email: string; + password: string; }): Promise<{ success: boolean; error?: string }> { try { const response = await fetch('https://agilite.slm-lab.net/api/jsonrpc', { @@ -224,6 +225,7 @@ async function createLeantimeUser(userData: { lastname: userData.lastName, username: userData.username, email: userData.email, + password: userData.password, status: 'active', role: 'user', // Default role in Leantime } @@ -414,6 +416,7 @@ export async function POST(req: Request) { firstName: data.firstName, lastName: data.lastName, email: data.email, + password: data.password, }); if (!leantimeResult.success) {