mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
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:
parent
37deda3587
commit
1bb9c3a9ac
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user