Cache meta

This commit is contained in:
syuilo
2019-04-24 08:11:19 +09:00
parent 8a55bdd89d
commit 5aa5896b22
34 changed files with 62 additions and 55 deletions

View File

@ -7,7 +7,7 @@ import { publishMainStream } from '../../../services/stream';
import redis from '../../../db/redis';
import * as uuid from 'uuid';
import signin from '../common/signin';
import fetchMeta from '../../../misc/fetch-meta';
import { fetchMeta } from '../../../misc/fetch-meta';
import { Users, UserProfiles } from '../../../models';
import { ILocalUser } from '../../../models/entities/user';
import { ensure } from '../../../prelude/ensure';
@ -65,7 +65,7 @@ router.get('/disconnect/github', async ctx => {
});
async function getOath2() {
const meta = await fetchMeta();
const meta = await fetchMeta(true);
if (meta.enableGithubIntegration && meta.githubClientId && meta.githubClientSecret) {
return new OAuth2(