2021-08-19 12:55:45 +00:00
|
|
|
import define from '../../define';
|
2021-10-21 20:36:48 +00:00
|
|
|
import { driveChart, notesChart, usersChart } from '@/services/chart/index';
|
2021-08-19 12:55:45 +00:00
|
|
|
import { insertModerationLog } from '@/services/insert-moderation-log';
|
2019-09-01 19:41:26 +00:00
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['admin'],
|
|
|
|
|
2020-02-15 12:33:32 +00:00
|
|
|
requireCredential: true as const,
|
2019-09-01 19:41:26 +00:00
|
|
|
requireModerator: true,
|
|
|
|
};
|
|
|
|
|
2022-01-02 17:12:50 +00:00
|
|
|
// eslint-disable-next-line import/no-default-export
|
2019-09-01 19:41:26 +00:00
|
|
|
export default define(meta, async (ps, me) => {
|
|
|
|
insertModerationLog(me, 'chartResync');
|
|
|
|
|
|
|
|
driveChart.resync();
|
|
|
|
notesChart.resync();
|
|
|
|
usersChart.resync();
|
|
|
|
|
|
|
|
// TODO: ユーザーごとのチャートもキューに入れて更新する
|
2021-10-21 20:36:48 +00:00
|
|
|
// TODO: インスタンスごとのチャートもキューに入れて更新する
|
2019-09-01 19:41:26 +00:00
|
|
|
});
|