ドライブ容量の設定をDBに保存するようにしたりリファクタリングしたり

This commit is contained in:
syuilo
2018-11-06 07:14:43 +09:00
parent 06bb2a1c7c
commit 8f714b5b12
18 changed files with 133 additions and 54 deletions

View File

@ -1,14 +1,14 @@
import Note from '../../../../models/note';
import Meta from '../../../../models/meta';
import define from '../../define';
import fetchMeta from '../../../../misc/fetch-meta';
export const meta = {
requireCredential: false,
};
export default define(meta, (ps) => new Promise(async (res, rej) => {
const meta = await Meta.findOne({});
const hidedTags = meta ? (meta.hidedTags || []).map(t => t.toLowerCase()) : [];
const instance = await fetchMeta();
const hidedTags = instance.hidedTags.map(t => t.toLowerCase());
const span = 1000 * 60 * 60 * 24 * 7; // 1週間