fix(api): 🐛 Fix user registration incorrectly counting remote users as local

This commit is contained in:
Jesse Wierzbinski 2025-01-06 18:14:09 +01:00
parent 0e9db83279
commit dcdc8c7365
No known key found for this signature in database

View file

@ -226,8 +226,7 @@ export default apiRoute((app) =>
// Check if username is taken
if (
await User.fromSql(
and(eq(Users.username, username)),
isNull(Users.instanceId),
and(eq(Users.username, username), isNull(Users.instanceId)),
)
) {
errors.details.username.push({