I have a Post model with beforeEncode set:
Post
beforeEncode
extension Post { func beforeEncode() throws {