sharkey/packages/backend/src/server/api/endpoints/admin/queue/clear.ts
2022-01-03 02:12:50 +09:00

20 lines
429 B
TypeScript

import define from '../../../define';
import { destroy } from '@/queue/index';
import { insertModerationLog } from '@/services/insert-moderation-log';
export const meta = {
tags: ['admin'],
requireCredential: true as const,
requireModerator: true,
params: {},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
destroy();
insertModerationLog(me, 'clearQueue');
});