2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01: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:
Nazar Gargol 2019-11-25 12:04:58 +07:00
parent 65adbf7514
commit 075fb76a60
2 changed files with 3 additions and 4 deletions

View file

@ -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);
});
}
}

View file

@ -1,7 +1,7 @@
module.exports = {
read(email, apiConfig, frame) {
frame.response = {
emails: [email]
emails: [email.toJSON(frame.options)]
};
},