Expose proxyAccountName (#6670)

This commit is contained in:
MeiMei
2020-08-29 08:56:32 +09:00
committed by GitHub
parent 5864b52a81
commit c2d7929391
4 changed files with 16 additions and 1 deletions

View File

@@ -326,6 +326,9 @@ router.get('/info', async ctx => {
const emojis = await Emojis.find({
where: { host: null }
});
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
await ctx.render('info', {
version: config.version,
machine: os.hostname(),
@@ -339,6 +342,7 @@ router.get('/info', async ctx => {
},
emojis: emojis,
meta: meta,
proxyAccountName: proxyAccount ? proxyAccount.username : null,
originalUsersCount: await Users.count({ host: null }),
originalNotesCount: await Notes.count({ userHost: null })
});