mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(api): 🐛 Fix user registration incorrectly counting remote users as local
This commit is contained in:
parent
0e9db83279
commit
dcdc8c7365
|
|
@ -226,8 +226,7 @@ export default apiRoute((app) =>
|
||||||
// Check if username is taken
|
// Check if username is taken
|
||||||
if (
|
if (
|
||||||
await User.fromSql(
|
await User.fromSql(
|
||||||
and(eq(Users.username, username)),
|
and(eq(Users.username, username), isNull(Users.instanceId)),
|
||||||
isNull(Users.instanceId),
|
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
errors.details.username.push({
|
errors.details.username.push({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue