Feature / user recommendation config in admin ui (#3357)
* add config for external user recommendation into admin ui
* debug
* correct admin ui
* switch external user recommendation to admin ui config
* debug
* debug
* debug
* Revert "debug"
This reverts commit f4a0460e5b
.
* explicit parseInt radix
* add Japanese message
* change default engine to https
* remove unused settings
* debug
* nullable externalUserRecommendationTimeout
This commit is contained in:
@@ -200,6 +200,27 @@ 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': '外部ユーザーレコメンデーションのタイムアウト (ミリ秒)'
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -315,6 +336,18 @@ 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;
|
||||
}
|
||||
|
||||
await Meta.update({}, {
|
||||
$set: set
|
||||
}, { upsert: true });
|
||||
|
Reference in New Issue
Block a user