add user leantime api 3
This commit is contained in:
parent
bd12734bb8
commit
516e80905e
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user