summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/admin/update-meta.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/admin/update-meta.ts')
-rw-r--r--src/server/api/endpoints/admin/update-meta.ts167
1 files changed, 166 insertions, 1 deletions
diff --git a/src/server/api/endpoints/admin/update-meta.ts b/src/server/api/endpoints/admin/update-meta.ts
index bbae212bd7..6ceb2a98dc 100644
--- a/src/server/api/endpoints/admin/update-meta.ts
+++ b/src/server/api/endpoints/admin/update-meta.ts
@@ -46,6 +46,13 @@ export const meta = {
}
},
+ errorImageUrl: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'インスタンスのエラー画像URL'
+ }
+ },
+
name: {
validator: $.str.optional.nullable,
desc: {
@@ -139,6 +146,13 @@ export const meta = {
}
},
+ summalyProxy: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'summalyプロキシURL'
+ }
+ },
+
enableTwitterIntegration: {
validator: $.bool.optional,
desc: {
@@ -200,7 +214,98 @@ export const meta = {
desc: {
'ja-JP': 'DiscordアプリのClient Secret'
}
- }
+ },
+
+ enableExternalUserRecommendation: {
+ validator: $.bool.optional,
+ desc: {
+ 'ja-JP': '外部ユーザーレコメンデーションを有効にする'
+ }
+ },
+
+ externalUserRecommendationEngine: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': '外部ユーザーレコメンデーションのサードパーティエンジン'
+ }
+ },
+
+ externalUserRecommendationTimeout: {
+ validator: $.num.optional.nullable.min(0),
+ desc: {
+ 'ja-JP': '外部ユーザーレコメンデーションのタイムアウト (ミリ秒)'
+ }
+ },
+
+ enableEmail: {
+ validator: $.bool.optional,
+ desc: {
+ 'ja-JP': 'メール配信を有効にするか否か'
+ }
+ },
+
+ email: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'メール配信する際に利用するメールアドレス'
+ }
+ },
+
+ smtpSecure: {
+ validator: $.bool.optional,
+ desc: {
+ 'ja-JP': 'SMTPサーバがSSLを使用しているか否か'
+ }
+ },
+
+ smtpHost: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'SMTPサーバのホスト'
+ }
+ },
+
+ smtpPort: {
+ validator: $.num.optional.nullable,
+ desc: {
+ 'ja-JP': 'SMTPサーバのポート'
+ }
+ },
+
+ smtpUser: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'SMTPサーバのユーザー名'
+ }
+ },
+
+ smtpPass: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'SMTPサーバのパスワード'
+ }
+ },
+
+ enableServiceWorker: {
+ validator: $.bool.optional,
+ desc: {
+ 'ja-JP': 'ServiceWorkerを有効にするか否か'
+ }
+ },
+
+ swPublicKey: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'ServiceWorkerのVAPIDキーペアの公開鍵'
+ }
+ },
+
+ swPrivateKey: {
+ validator: $.str.optional.nullable,
+ desc: {
+ 'ja-JP': 'ServiceWorkerのVAPIDキーペアの秘密鍵'
+ }
+ },
}
};
@@ -279,6 +384,10 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
set.langs = ps.langs;
}
+ if (ps.summalyProxy !== undefined) {
+ set.summalyProxy = ps.summalyProxy;
+ }
+
if (ps.enableTwitterIntegration !== undefined) {
set.enableTwitterIntegration = ps.enableTwitterIntegration;
}
@@ -315,6 +424,62 @@ export default define(meta, (ps) => new Promise(async (res, rej) => {
set.discordClientSecret = ps.discordClientSecret;
}
+ if (ps.enableExternalUserRecommendation !== undefined) {
+ set.enableExternalUserRecommendation = ps.enableExternalUserRecommendation;
+ }
+
+ if (ps.externalUserRecommendationEngine !== undefined) {
+ set.externalUserRecommendationEngine = ps.externalUserRecommendationEngine;
+ }
+
+ if (ps.externalUserRecommendationTimeout !== undefined) {
+ set.externalUserRecommendationTimeout = ps.externalUserRecommendationTimeout;
+ }
+
+ if (ps.enableEmail !== undefined) {
+ set.enableEmail = ps.enableEmail;
+ }
+
+ if (ps.email !== undefined) {
+ set.email = ps.email;
+ }
+
+ if (ps.smtpSecure !== undefined) {
+ set.smtpSecure = ps.smtpSecure;
+ }
+
+ if (ps.smtpHost !== undefined) {
+ set.smtpHost = ps.smtpHost;
+ }
+
+ if (ps.smtpPort !== undefined) {
+ set.smtpPort = ps.smtpPort;
+ }
+
+ if (ps.smtpUser !== undefined) {
+ set.smtpUser = ps.smtpUser;
+ }
+
+ if (ps.smtpPass !== undefined) {
+ set.smtpPass = ps.smtpPass;
+ }
+
+ if (ps.errorImageUrl !== undefined) {
+ set.errorImageUrl = ps.errorImageUrl;
+ }
+
+ if (ps.enableServiceWorker !== undefined) {
+ set.enableServiceWorker = ps.enableServiceWorker;
+ }
+
+ if (ps.swPublicKey !== undefined) {
+ set.swPublicKey = ps.swPublicKey;
+ }
+
+ if (ps.swPrivateKey !== undefined) {
+ set.swPrivateKey = ps.swPrivateKey;
+ }
+
await Meta.update({}, {
$set: set
}, { upsert: true });