parent
037837b551
commit
0e4a111f81
1714 changed files with 20803 additions and 11751 deletions
9
packages/backend/src/misc/fetch-proxy-account.ts
Normal file
9
packages/backend/src/misc/fetch-proxy-account.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { fetchMeta } from './fetch-meta';
|
||||
import { ILocalUser } from '@/models/entities/user';
|
||||
import { Users } from '@/models/index';
|
||||
|
||||
export async function fetchProxyAccount(): Promise<ILocalUser | null> {
|
||||
const meta = await fetchMeta();
|
||||
if (meta.proxyAccountId == null) return null;
|
||||
return await Users.findOneOrFail(meta.proxyAccountId) as ILocalUser;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue