refs #2051 perf: rename variable
This commit is contained in:
parent
9316c31180
commit
dc98436b85
|
@ -18,7 +18,7 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.removeFile = async(ctx, id, options) => {
|
Self.removeFile = async(ctx, dmsFk, options) => {
|
||||||
const myOptions = {};
|
const myOptions = {};
|
||||||
let tx;
|
let tx;
|
||||||
if (typeof options == 'object')
|
if (typeof options == 'object')
|
||||||
|
@ -31,10 +31,10 @@ module.exports = Self => {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const WorkerDms = await Self.findOne({
|
const WorkerDms = await Self.findOne({
|
||||||
where: {document: id}
|
where: {document: dmsFk}
|
||||||
}, myOptions);
|
}, 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)
|
if (!targetDms || !WorkerDms)
|
||||||
throw new UserError('Try again');
|
throw new UserError('Try again');
|
||||||
|
|
Loading…
Reference in New Issue