mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Moved toJSON calls to serializer
- toJSON transformations should happen on serializer level so controllers could be called directly with it's own options internally
This commit is contained in:
parent
65adbf7514
commit
075fb76a60
2 changed files with 3 additions and 4 deletions
|
@ -27,7 +27,7 @@ module.exports = {
|
|||
});
|
||||
}
|
||||
|
||||
return model.toJSON(frame.options);
|
||||
return model;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -52,8 +52,7 @@ module.exports = {
|
|||
});
|
||||
}
|
||||
|
||||
const result = await megaService.mega.retryFailedEmail(model);
|
||||
return result.toJSON(frame.options);
|
||||
return await megaService.mega.retryFailedEmail(model);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
module.exports = {
|
||||
read(email, apiConfig, frame) {
|
||||
frame.response = {
|
||||
emails: [email]
|
||||
emails: [email.toJSON(frame.options)]
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue