From 69f246ce7faaa42637c7bc84d69de674d42b46ee Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 11 Dec 2018 21:17:57 +0900 Subject: [PATCH] Fix bug --- src/client/app/common/views/pages/404.vue | 29 ++++++++++--------- src/misc/fetch-meta.ts | 3 +- src/server/api/endpoints/admin/update-meta.ts | 4 +++ src/server/api/endpoints/meta.ts | 1 + 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/client/app/common/views/pages/404.vue b/src/client/app/common/views/pages/404.vue index 236e43ec6..5d6db5075 100644 --- a/src/client/app/common/views/pages/404.vue +++ b/src/client/app/common/views/pages/404.vue @@ -1,10 +1,10 @@ @@ -16,7 +16,7 @@ export default Vue.extend({ i18n: i18n('common/views/pages/404.vue'), data() { return { - src: '/assets/error.jpg' + src: '' } }, created() { @@ -29,7 +29,7 @@ export default Vue.extend({ diff --git a/src/misc/fetch-meta.ts b/src/misc/fetch-meta.ts index 509d02ef4..a2eea83c9 100644 --- a/src/misc/fetch-meta.ts +++ b/src/misc/fetch-meta.ts @@ -18,7 +18,8 @@ const defaultMeta: any = { enableDiscordIntegration: false, enableExternalUserRecommendation: false, externalUserRecommendationEngine: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}", - externalUserRecommendationTimeout: 300000 + externalUserRecommendationTimeout: 300000, + errorImageUrl: 'https://ai.misskey.xyz/aiart/yubitun.png' }; export default async function(): Promise { diff --git a/src/server/api/endpoints/admin/update-meta.ts b/src/server/api/endpoints/admin/update-meta.ts index b19168244..5c156442e 100644 --- a/src/server/api/endpoints/admin/update-meta.ts +++ b/src/server/api/endpoints/admin/update-meta.ts @@ -443,6 +443,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => { set.smtpPass = ps.smtpPass; } + if (ps.errorImageUrl !== undefined) { + set.errorImageUrl = ps.errorImageUrl; + } + await Meta.update({}, { $set: set }, { upsert: true }); diff --git a/src/server/api/endpoints/meta.ts b/src/server/api/endpoints/meta.ts index 6ec5dfb88..a9984e147 100644 --- a/src/server/api/endpoints/meta.ts +++ b/src/server/api/endpoints/meta.ts @@ -65,6 +65,7 @@ export default define(meta, (ps, me) => new Promise(async (res, rej) => { recaptchaSiteKey: instance.recaptchaSiteKey, swPublickey: config.sw ? config.sw.public_key : null, bannerUrl: instance.bannerUrl, + errorImageUrl: instance.errorImageUrl, maxNoteTextLength: instance.maxNoteTextLength, emojis: emojis, enableEmail: instance.enableEmail,