mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Added 404 handling for edit Offer
no-issue This was also missing as part of the Offers API.
This commit is contained in:
parent
a6982d5606
commit
696d8e3c49
1 changed files with 7 additions and 0 deletions
|
@ -50,6 +50,13 @@ module.exports = {
|
||||||
...frame.data.offers[0],
|
...frame.data.offers[0],
|
||||||
id: frame.options.id
|
id: frame.options.id
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!offer) {
|
||||||
|
throw new errors.NotFoundError({
|
||||||
|
message: tpl(messages.offerNotFound)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
frame.response = {
|
frame.response = {
|
||||||
offers: [offer]
|
offers: [offer]
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue