Expose proxyAccountName (#6670)
This commit is contained in:
parent
5864b52a81
commit
c2d7929391
|
@ -99,6 +99,8 @@ export default define(meta, async (ps, me) => {
|
|||
}
|
||||
});
|
||||
|
||||
const proxyAccount = instance.proxyAccountId ? await Users.pack(instance.proxyAccountId).catch(() => null) : null;
|
||||
|
||||
const response: any = {
|
||||
maintainerName: instance.maintainerName,
|
||||
maintainerEmail: instance.maintainerEmail,
|
||||
|
@ -143,6 +145,8 @@ export default define(meta, async (ps, me) => {
|
|||
enableDiscordIntegration: instance.enableDiscordIntegration,
|
||||
|
||||
enableServiceWorker: instance.enableServiceWorker,
|
||||
|
||||
proxyAccountName: proxyAccount ? proxyAccount.username : null,
|
||||
};
|
||||
|
||||
if (ps.detail) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import * as Router from '@koa/router';
|
||||
import config from '../config';
|
||||
import { fetchMeta } from '../misc/fetch-meta';
|
||||
import { Users } from '../models';
|
||||
// import User from '../models/user';
|
||||
// import Note from '../models/note';
|
||||
|
||||
|
@ -34,6 +35,8 @@ const nodeinfo2 = async () => {
|
|||
// Note.count({ '_user.host': null, replyId: { $ne: null } })
|
||||
]);
|
||||
|
||||
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
|
||||
|
||||
return {
|
||||
software: {
|
||||
name: 'misskey',
|
||||
|
@ -72,7 +75,8 @@ const nodeinfo2 = async () => {
|
|||
enableGithubIntegration: meta.enableGithubIntegration,
|
||||
enableDiscordIntegration: meta.enableDiscordIntegration,
|
||||
enableEmail: meta.enableEmail,
|
||||
enableServiceWorker: meta.enableServiceWorker
|
||||
enableServiceWorker: meta.enableServiceWorker,
|
||||
proxyAccountName: proxyAccount ? proxyAccount.username : null,
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
|
@ -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 })
|
||||
});
|
||||
|
|
|
@ -79,6 +79,9 @@ html
|
|||
td
|
||||
= meta.maintainerName
|
||||
| <#{meta.maintainerEmail}>
|
||||
tr
|
||||
th Proxy account name
|
||||
td= proxyAccountName || '(none)'
|
||||
tr
|
||||
th System
|
||||
td= os
|
||||
|
|
Loading…
Reference in New Issue