0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Added cache invalidation to the POST authentication/setup route

issue https://github.com/TryGhost/Team/issues/859
This commit is contained in:
Thibaut Patel 2021-07-05 16:01:18 +02:00
parent 50eddaa208
commit 9c2cfb5d00
4 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,9 @@ module.exports = {
setup: {
statusCode: 201,
permissions: false,
headers: {
cacheInvalidate: true
},
validation: {
docName: 'setup'
},

View file

@ -13,6 +13,9 @@ module.exports = {
setup: {
statusCode: 201,
permissions: false,
headers: {
cacheInvalidate: true
},
validation: {
docName: 'setup'
},

View file

@ -61,6 +61,7 @@ describe('Authentication API v3', function () {
const jsonResponse = res.body;
should.exist(jsonResponse.users);
should.not.exist(jsonResponse.meta);
should.exist(res.headers['x-cache-invalidate']);
jsonResponse.users.should.have.length(1);
localUtils.API.checkResponse(jsonResponse.users[0], 'user');

View file

@ -61,6 +61,7 @@ describe('Authentication API v3', function () {
const jsonResponse = res.body;
should.exist(jsonResponse.users);
should.not.exist(jsonResponse.meta);
should.exist(res.headers['x-cache-invalidate']);
jsonResponse.users.should.have.length(1);
localUtils.API.checkResponse(jsonResponse.users[0], 'user');