这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

resolves #367

@review-agent-prime
Copy link

server/models/user.js

Since the updated user is not used anywhere in the code, there is no need to assign the result of the update operation to a variable. This can save memory and improve performance.
Create Issue

    await prisma.users.update({
      where: { id: parseInt(userId) },
      data: updates,
    });
    return { success: true, error: null };

@timothycarambat timothycarambat merged commit 085745c into master Nov 14, 2023
@timothycarambat timothycarambat deleted the 367-prevent-admin-lockout branch November 14, 2023 22:43
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Self- lockout of admin protection

2 participants