mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03: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
@ -50,6 +50,13 @@ module.exports = {
|
||||
...frame.data.offers[0],
|
||||
id: frame.options.id
|
||||
});
|
||||
|
||||
if (!offer) {
|
||||
throw new errors.NotFoundError({
|
||||
message: tpl(messages.offerNotFound)
|
||||
});
|
||||
}
|
||||
|
||||
frame.response = {
|
||||
offers: [offer]
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user