Option to call custom formatters on each entry (maybe it is added, just missing in doc)
Casperhr opened this issue · 0 comments
Casperhr commented
Right now I have to do something like this
var node = try paginator.makeNode()
let data = node["data"]?.nodeArray
var newData: [Node] = []
for item in data! {
let message = try ListingMessage(node: item)
try newData.append(message.makeJSON(authedUser: request.lbUser(), imageSize: imageSize, thumbnailSize: thumbnailSize, backendUserSize: backendUserSize).node)
}
node["data"] = try Node(node: newData)
// TODO Figure out a way to format easier