fix: Delete collection exports (#2595)
This commit is contained in:
@@ -34,10 +34,14 @@ const FileOperation = sequelize.define("file_operations", {
|
||||
},
|
||||
});
|
||||
|
||||
FileOperation.beforeDestroy(async (model) => {
|
||||
await deleteFromS3(model.key);
|
||||
});
|
||||
|
||||
FileOperation.prototype.expire = async function () {
|
||||
this.state = "expired";
|
||||
await deleteFromS3(this.key);
|
||||
this.save();
|
||||
await this.save();
|
||||
};
|
||||
|
||||
FileOperation.associate = (models) => {
|
||||
|
||||
Reference in New Issue
Block a user