Skip to content

Commit

Permalink
changes for dhl
Browse files Browse the repository at this point in the history
  • Loading branch information
freshlogic committed May 27, 2022
1 parent 69a4a9f commit 3c89249
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.9.0] - 2022-05-27
### Added
- DHL eCommerce Solutions support.

## [1.8.1] - 2021-07-31
### Changed
- Updated the pitney-bowes module to ~0.3.0.
Expand Down
4 changes: 2 additions & 2 deletions carriers/dhlEcommerceSolutions.js
Expand Up @@ -104,7 +104,7 @@ function DhlEcommerceSolutions(options) {
return callback(err);
}

if (!body || !body.packages || !body.packages.length) {
if (!body?.packages?.length) {
return callback(null, results);
}

Expand Down Expand Up @@ -143,7 +143,7 @@ function DhlEcommerceSolutions(options) {
});

// Add url to carrier tracking page
results.url = `http://webtrack.dhlglobalmail.com/?trackingnumber=${encodeURIComponent(trackingNumber)}`;
results.url = `https://www.dhl.com/global-en/home/tracking/tracking-ecommerce.html?tracking-id=${encodeURIComponent(trackingNumber)}`;

// Reverse results again to get events in order Most Recent - Least Recent
results.events.reverse();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -2,7 +2,7 @@
"description": "Bloodhound is a Node.js package that allows you to retrieve tracking data from shipping carriers (DHL, FedEx, UPS, USPS) in a common format.",
"dependencies": {
"async": "~3.2.0",
"dhl-ecommerce-solutions": "~0.2.0",
"dhl-ecommerce-solutions": "~0.3.0",
"fast-xml-parser": "~3.21.0",
"moment-timezone": "~0.5.28",
"node-geocoder": "~3.28.0",
Expand Down Expand Up @@ -40,5 +40,5 @@
"type": "git",
"url": "https://github.com/mediocre/bloodhound.git"
},
"version": "1.8.2"
"version": "1.9.0"
}

0 comments on commit 3c89249

Please sign in to comment.