Skip to content

Commit

Permalink
close #13 - fixed ups bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
egg- committed Jul 31, 2020
1 parent 787129f commit d2075c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: node_js
node_js:
- "12.18.2"
- "6.1"
- "5.11"
- "4.4.6"
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 2.4.3
* fixed an issue of UPS that always marked as InTransit

# 2.4.2
* update eparcel check point area

Expand Down
6 changes: 5 additions & 1 deletion lib/courier/ups.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ module.exports = function (opts) {
var checkpoint = {
courier: courier,
location: current.location,
message: current.activityScan,
message: current.activityScan.trim(),
status: tracker.STATUS.IN_TRANSIT,
time: moment([current.date, current.time].join(' '), 'YYYY/MM/DD HH:mm').format('YYYY-MM-DDTHH:mm')
}

if (checkpoint.message.indexOf('DELIVERED') !== -1) {
checkpoint.status = tracker.STATUS.DELIVERED
}

checkpoints.push(checkpoint)
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "delivery-tracker",
"version": "2.4.2",
"version": "2.4.3",
"author": {
"name": "egg",
"email": "i@egg.pe.kr"
Expand Down

0 comments on commit d2075c5

Please sign in to comment.