Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #525

Merged
merged 2 commits into from
May 9, 2024
Merged

Dev #525

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading