Skip to content

Commit

Permalink
fix: support ember-cli-deploy-display-revisions v2 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-engel authored Jul 15, 2022
1 parent e11a0c3 commit f93fbf6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/rest-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ module.exports = CoreObject.extend({

return denodeify(this._request.get)({ qs: qs }).then(function (response) {
return response.body.map(function (revision) {
// ember-cli-deploy-display-revisions expects the timestamp to be either
// a JS Date object or the number of milliseconds since 1970-01-01T00:00:00
var revisionData = Object.assign({}, revision.revision_data, {
timestamp: new Date(revision.revision_data.timestamp),
});

return {
revision: revision.id,
revisionData: revision.revision_data,
timestamp: new Date(revision.created_at),
revisionData: revisionData,
timestamp: new Date(revision.created_at * 1000),
active: revision.current,
};
});
Expand Down

0 comments on commit f93fbf6

Please sign in to comment.