Sharkey/packages/backend/src/queue/processors/object-storage/delete-file.ts
syuilo d071d18dd7
refactor: Use ESM (#8358)
* wip

* wip

* fix

* clean up

* Update tsconfig.json

* Update activitypub.ts

* wip
2022-02-27 11:07:39 +09:00

11 lines
326 B
TypeScript

import { ObjectStorageFileJobData } from '@/queue/types.js';
import Bull from 'bull';
import { deleteObjectStorageFile } from '@/services/drive/delete-file.js';
export default async (job: Bull.Job<ObjectStorageFileJobData>) => {
const key: string = job.data.key;
await deleteObjectStorageFile(key);
return 'Success';
};