forked from FoundKeyGang/FoundKey
server: fix undefined variable for instance actor
This commit is contained in:
parent
c7255dbea0
commit
062cba1b3c
1 changed files with 3 additions and 4 deletions
|
@ -11,10 +11,9 @@ let instanceActor = await Users.findOneBy({
|
|||
}) as ILocalUser | undefined;
|
||||
|
||||
export async function getInstanceActor(): Promise<ILocalUser> {
|
||||
if (instanceActor) {
|
||||
return instanceActor;
|
||||
} else {
|
||||
if (!instanceActor) {
|
||||
instanceActor = await createSystemUser(ACTOR_USERNAME) as ILocalUser;
|
||||
return created;
|
||||
}
|
||||
|
||||
return instanceActor;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue