Skip to content

Commit

Permalink
Merge pull request #525 from evershopcommerce/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
treoden authored May 9, 2024
2 parents 717a616 + 2e387f6 commit 6cd5dc2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ module.exports = async function buildUrlReWrite(data) {
// Delete the url rewrite for the product
await execute(
pool,
`DELETE FROM url_rewrite WHERE entity_uuid = ${productUuid} AND entity_type = 'product'`
`DELETE FROM url_rewrite WHERE entity_uuid = '${productUuid}' AND entity_type = 'product'`
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,11 @@ module.exports = async (request, response, deledate, next) => {
});
return;
}
const zone = await del('shipping_zone')
.where('uuid', '=', id)
.execute(connection);

await del('shipping_zone').where('uuid', '=', id).execute(connection);
await commit(connection);
response.status(OK);
response.json({
data: zone
data: shippingZone
});
} catch (e) {
error(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ module.exports = async (request, response, deledate, next) => {
}

// Delete the shipping zone method
const method = await del('shipping_zone_method')
await del('shipping_zone_method')
.where('method_id', '=', zoneMethod.shipping_method_id)
.and('zone_id', '=', shippingZone.shipping_zone_id)
.execute(connection);
await commit(connection);
response.status(OK);
response.json({
data: method
data: zoneMethod
});
} catch (e) {
await rollback(connection);
Expand Down

0 comments on commit 6cd5dc2

Please sign in to comment.