Invalidated site cache when adding & editing Offers

no-issue

Because adding and editing Offers can update the redirects for Ghost, we
should ensure that any site cache is cleared so as to not conflict with
Offer redirects.
This commit is contained in:
Fabien O'Carroll 2021-10-12 14:24:43 +02:00 committed by Fabien 'egg' O'Carroll
parent 37deda3587
commit 1bb9c3a9ac

View File

@ -27,6 +27,9 @@ module.exports = {
edit: {
options: ['id'],
permissions: true,
headers: {
cacheInvalidate: true
},
async query(frame) {
const offer = await offersService.api.updateOffer({
...frame.data.offers[0],
@ -40,6 +43,9 @@ module.exports = {
add: {
permissions: true,
headers: {
cacheInvalidate: true
},
async query(frame) {
const offer = await offersService.api.createOffer(frame.data.offers[0]);
frame.response = {