forked from FoundKeyGang/FoundKey
server: fix instance actor creation
Because findBy returns an array which is always truthy, this would mean the user is not actually created as requested and instead an empty array is returned.
This commit is contained in:
parent
2d46cf7c1e
commit
2f30af1812
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ import { db } from '@/db/postgre.js';
|
|||
import generateNativeUserToken from '@/server/api/common/generate-native-user-token.js';
|
||||
|
||||
export async function getSystemUser(username: string): Promise<User> {
|
||||
const exist = await Users.findBy({
|
||||
const exist = await Users.findOneBy({
|
||||
usernameLower: username.toLowerCase(),
|
||||
host: IsNull(),
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue