refactor(Tasks API): ghanged method to GET
gitea/salix/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Joan Sanchez 2022-07-26 11:47:43 +02:00
parent 2122f8adac
commit f4825488c6
2 changed files with 4 additions and 5 deletions

View File

@ -11,11 +11,11 @@ module.exports = Self => {
},
http: {
path: `/deleteTrashFiles`,
verb: 'POST'
verb: 'GET'
}
});
Self.deleteTrashFiles = async(options) => {
Self.deleteTrashFiles = async options => {
const tx = await Self.beginTransaction({});
const myOptions = {};
@ -47,10 +47,9 @@ module.exports = Self => {
await dms.destroy(myOptions);
}
if (tx) await tx.commit();
} catch (e) {
if (tx) await tx.rollback();
throw e;
}
};

View File

@ -12,7 +12,7 @@ module.exports = Self => {
},
http: {
path: `/downloadImages`,
verb: 'POST'
verb: 'GET'
}
});