From d62a6bab4183afe78070c14fcaace8f847e5ea9e Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 2 Nov 2018 23:27:47 +0900 Subject: [PATCH] Remove needless properties --- src/client/app/mios.ts | 4 +++- src/server/api/endpoints/meta.ts | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts index 9c351e9041..4350b41806 100644 --- a/src/client/app/mios.ts +++ b/src/client/app/mios.ts @@ -537,7 +537,9 @@ export default class MiOS extends EventEmitter { // forceが有効, meta情報を保持していない or 期限切れ if (force || this.meta == null || Date.now() - this.meta.chachedAt.getTime() > expire) { this.isMetaFetching = true; - const meta = await this.api('meta'); + const meta = await this.api('meta', { + detail: false + }); this.meta = { data: meta, chachedAt: new Date() diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 0a75c50e65..3d26003a1a 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -29,7 +29,11 @@ export const meta = { export default define(meta, (ps, me) => new Promise(async (res, rej) => { const met: any = (await Meta.findOne()) || {}; - const emojis = await Emoji.find({ host: null }); + const emojis = await Emoji.find({ host: null }, { + fields: { + _id: false + } + }); res({ maintainer: config.maintainer,