refs #2051 perf: rename variable

This commit is contained in:
Javier Segarra 2023-12-15 13:01:44 +01:00
parent 9316c31180
commit dc98436b85
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ module.exports = Self => {
}
});
Self.removeFile = async(ctx, id, options) => {
Self.removeFile = async(ctx, dmsFk, options) => {
const myOptions = {};
let tx;
if (typeof options == 'object')
@ -31,10 +31,10 @@ module.exports = Self => {
try {
const WorkerDms = await Self.findOne({
where: {document: id}
where: {document: dmsFk}
}, myOptions);
const targetDms = await Self.app.models.Dms.removeFile(ctx, id, myOptions);
const targetDms = await Self.app.models.Dms.removeFile(ctx, dmsFk, myOptions);
if (!targetDms || !WorkerDms)
throw new UserError('Try again');