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