diff --git a/app/api/users/[userId]/route.ts b/app/api/users/[userId]/route.ts index 2606b348..9aca4e20 100644 --- a/app/api/users/[userId]/route.ts +++ b/app/api/users/[userId]/route.ts @@ -5,7 +5,7 @@ import { NextResponse } from "next/server"; // Helper function to delete user from Leantime async function deleteLeantimeUser(username: string): Promise<{ success: boolean; error?: string }> { try { - // First, get the Leantime user ID by username + // First, get the Leantime user by username const getUserResponse = await fetch('https://agilite.slm-lab.net/api/jsonrpc', { method: 'POST', headers: { @@ -13,7 +13,7 @@ async function deleteLeantimeUser(username: string): Promise<{ success: boolean; 'X-API-Key': process.env.LEANTIME_TOKEN || '', }, body: JSON.stringify({ - method: 'leantime.rpc.Users.Users.getUserByUsername', + method: 'leantime.rpc.Users.Users.getUser', jsonrpc: '2.0', id: 1, params: {