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 f4a0460e5bde21cd1f39a735f496a2d74233ef3f. * explicit parseInt radix * add Japanese message * change default engine to https * remove unused settings * debug * nullable externalUserRecommendationTimeout
This commit is contained in:
@ -125,6 +125,19 @@ if ((config as any).github) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if ((config as any).user_recommendation) {
|
||||
Meta.findOne({}).then(m => {
|
||||
if (m != null && m.enableExternalUserRecommendation == null) {
|
||||
Meta.update({}, {
|
||||
$set: {
|
||||
enableExternalUserRecommendation: true,
|
||||
externalUserRecommendationEngine: (config as any).user_recommendation.engine,
|
||||
externalUserRecommendationTimeout: (config as any).user_recommendation.timeout
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export type IMeta = {
|
||||
name?: string;
|
||||
@ -195,4 +208,8 @@ export type IMeta = {
|
||||
enableDiscordIntegration?: boolean;
|
||||
discordClientId?: string;
|
||||
discordClientSecret?: string;
|
||||
|
||||
enableExternalUserRecommendation?: boolean;
|
||||
externalUserRecommendationEngine?: string;
|
||||
externalUserRecommendationTimeout?: number;
|
||||
};
|
||||
|
Reference in New Issue
Block a user