Expose proxyAccountName (#6670)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user