Skip to content

Commit

Permalink
fix: use correct header
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin committed Oct 12, 2024
1 parent aca3f69 commit 271fe39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/application/PassController.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class PassController {
const updatedReservationPass = await this.getUpdatedPassUseCase.execute({ passTypeIdentifier, serialNumber });
const pass = await this.passAdapter.get(updatedReservationPass);
const lastUpdated = dayjs(updatedReservationPass.updatedAt).utc().format('ddd, DD, MMM, YYYY HH:mm:ss');
return h.response(pass).code(200).type('application/vnd.apple.pkpass').header('Last-Updated', `${lastUpdated} GMT`);
return h.response(pass).code(200).type('application/vnd.apple.pkpass').header('Last-Modified', `${lastUpdated} GMT`);
}

async create(request, h) {
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/passes_tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ describe('Acceptance | Endpoints | Passes', function () {
});

expect(response.statusCode).to.equal(200);
const { 'content-type': contentType, 'last-updated': lastUpdated } = response.headers;
const { 'content-type': contentType, 'last-modified': lastUpdated } = response.headers;
expect(contentType).to.equal('application/vnd.apple.pkpass');
expect(lastUpdated).to.equal('Tue, 02, Jan, 2024 00:00:00 GMT');
});
Expand Down

0 comments on commit 271fe39

Please sign in to comment.