misskey/src/misc/fetch-meta.ts
Hakaba Hitoyo ac14adfd3e 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
2018-11-21 23:44:59 +09:00

29 lines
782 B
TypeScript

import Meta, { IMeta } from '../models/meta';
const defaultMeta: any = {
name: 'Misskey',
maintainer: {},
langs: [],
cacheRemoteFiles: true,
localDriveCapacityMb: 256,
remoteDriveCapacityMb: 8,
hidedTags: [],
stats: {
originalNotesCount: 0,
originalUsersCount: 0
},
maxNoteTextLength: 1000,
enableTwitterIntegration: false,
enableGithubIntegration: false,
enableDiscordIntegration: false,
enableExternalUserRecommendation: false,
externalUserRecommendationEngine: "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-misskey-api.cgi?{{host}}+{{user}}+{{limit}}+{{offset}}",
externalUserRecommendationTimeout: 300000
};
export default async function(): Promise<IMeta> {
const meta = await Meta.findOne({});
return Object.assign({}, defaultMeta, meta);
}