refactor: replace let for const
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
1e11191e79
commit
ad3b3c44d6
|
@ -21,15 +21,13 @@ module.exports = Self => {
|
|||
Self.deleteSalesClaimed = async(ctx, sales, options) => {
|
||||
const models = Self.app.models;
|
||||
const myOptions = {};
|
||||
let tx;
|
||||
const tx = await Self.beginTransaction({});
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
if (!myOptions.transaction) {
|
||||
tx = await Self.beginTransaction({});
|
||||
if (!myOptions.transaction)
|
||||
myOptions.transaction = tx;
|
||||
}
|
||||
|
||||
try {
|
||||
const promises = [];
|
||||
|
|
|
@ -24,16 +24,14 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.updateClaimDestination = async(rows, claimDestinationFk, options) => {
|
||||
let tx;
|
||||
const tx = await Self.beginTransaction({});
|
||||
const myOptions = {};
|
||||
|
||||
if (typeof options == 'object')
|
||||
Object.assign(myOptions, options);
|
||||
|
||||
if (!myOptions.transaction) {
|
||||
tx = await Self.beginTransaction({});
|
||||
if (!myOptions.transaction)
|
||||
myOptions.transaction = tx;
|
||||
}
|
||||
|
||||
try {
|
||||
const models = Self.app.models;
|
||||
|
|
Loading…
Reference in New Issue