Skip to content

Commit 271fe39

Browse files
fix: use correct header
1 parent aca3f69 commit 271fe39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/application/PassController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class PassController {
6161
const updatedReservationPass = await this.getUpdatedPassUseCase.execute({ passTypeIdentifier, serialNumber });
6262
const pass = await this.passAdapter.get(updatedReservationPass);
6363
const lastUpdated = dayjs(updatedReservationPass.updatedAt).utc().format('ddd, DD, MMM, YYYY HH:mm:ss');
64-
return h.response(pass).code(200).type('application/vnd.apple.pkpass').header('Last-Updated', `${lastUpdated} GMT`);
64+
return h.response(pass).code(200).type('application/vnd.apple.pkpass').header('Last-Modified', `${lastUpdated} GMT`);
6565
}
6666

6767
async create(request, h) {

tests/acceptance/passes_tests.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ describe('Acceptance | Endpoints | Passes', function () {
208208
});
209209

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

0 commit comments

Comments
 (0)