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 = {
|
const response: any = {
|
||||||
maintainerName: instance.maintainerName,
|
maintainerName: instance.maintainerName,
|
||||||
maintainerEmail: instance.maintainerEmail,
|
maintainerEmail: instance.maintainerEmail,
|
||||||
|
@ -143,6 +145,8 @@ export default define(meta, async (ps, me) => {
|
||||||
enableDiscordIntegration: instance.enableDiscordIntegration,
|
enableDiscordIntegration: instance.enableDiscordIntegration,
|
||||||
|
|
||||||
enableServiceWorker: instance.enableServiceWorker,
|
enableServiceWorker: instance.enableServiceWorker,
|
||||||
|
|
||||||
|
proxyAccountName: proxyAccount ? proxyAccount.username : null,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (ps.detail) {
|
if (ps.detail) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import * as Router from '@koa/router';
|
import * as Router from '@koa/router';
|
||||||
import config from '../config';
|
import config from '../config';
|
||||||
import { fetchMeta } from '../misc/fetch-meta';
|
import { fetchMeta } from '../misc/fetch-meta';
|
||||||
|
import { Users } from '../models';
|
||||||
// import User from '../models/user';
|
// import User from '../models/user';
|
||||||
// import Note from '../models/note';
|
// import Note from '../models/note';
|
||||||
|
|
||||||
|
@ -34,6 +35,8 @@ const nodeinfo2 = async () => {
|
||||||
// Note.count({ '_user.host': null, replyId: { $ne: null } })
|
// Note.count({ '_user.host': null, replyId: { $ne: null } })
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
software: {
|
software: {
|
||||||
name: 'misskey',
|
name: 'misskey',
|
||||||
|
@ -72,7 +75,8 @@ const nodeinfo2 = async () => {
|
||||||
enableGithubIntegration: meta.enableGithubIntegration,
|
enableGithubIntegration: meta.enableGithubIntegration,
|
||||||
enableDiscordIntegration: meta.enableDiscordIntegration,
|
enableDiscordIntegration: meta.enableDiscordIntegration,
|
||||||
enableEmail: meta.enableEmail,
|
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({
|
const emojis = await Emojis.find({
|
||||||
where: { host: null }
|
where: { host: null }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const proxyAccount = meta.proxyAccountId ? await Users.pack(meta.proxyAccountId).catch(() => null) : null;
|
||||||
|
|
||||||
await ctx.render('info', {
|
await ctx.render('info', {
|
||||||
version: config.version,
|
version: config.version,
|
||||||
machine: os.hostname(),
|
machine: os.hostname(),
|
||||||
|
@ -339,6 +342,7 @@ router.get('/info', async ctx => {
|
||||||
},
|
},
|
||||||
emojis: emojis,
|
emojis: emojis,
|
||||||
meta: meta,
|
meta: meta,
|
||||||
|
proxyAccountName: proxyAccount ? proxyAccount.username : null,
|
||||||
originalUsersCount: await Users.count({ host: null }),
|
originalUsersCount: await Users.count({ host: null }),
|
||||||
originalNotesCount: await Notes.count({ userHost: null })
|
originalNotesCount: await Notes.count({ userHost: null })
|
||||||
});
|
});
|
||||||
|
|
|
@ -79,6 +79,9 @@ html
|
||||||
td
|
td
|
||||||
= meta.maintainerName
|
= meta.maintainerName
|
||||||
| <#{meta.maintainerEmail}>
|
| <#{meta.maintainerEmail}>
|
||||||
|
tr
|
||||||
|
th Proxy account name
|
||||||
|
td= proxyAccountName || '(none)'
|
||||||
tr
|
tr
|
||||||
th System
|
th System
|
||||||
td= os
|
td= os
|
||||||
|
|
Loading…
Reference in a new issue