mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-13 02:00:10 +01:00
patch: do not block response if user password check failed
This commit is contained in:
parent
60fc5f715a
commit
273d824df4
@ -59,14 +59,17 @@ function adminEndpoints(app) {
|
||||
}
|
||||
|
||||
const { user: newUser, error } = await User.create(newUserParams);
|
||||
await EventLogs.logEvent(
|
||||
"user_created",
|
||||
{
|
||||
userName: newUser.username,
|
||||
createdBy: currUser.username,
|
||||
},
|
||||
currUser.id
|
||||
);
|
||||
if (!!newUser) {
|
||||
await EventLogs.logEvent(
|
||||
"user_created",
|
||||
{
|
||||
userName: newUser.username,
|
||||
createdBy: currUser.username,
|
||||
},
|
||||
currUser.id
|
||||
);
|
||||
}
|
||||
|
||||
response.status(200).json({ user: newUser, error });
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user