-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Thanks for creating screener, I'm using it for our mobile API.
I have an offer object and my filter looks like this
module.exports = {
_id: true,
title: true,
body: true,
location: true,
images: [require('../image')]
};and image looks like
var models = require('models');
module.exports = function(object) {
return models.Image.getUrl(object);
};It's working perfectly and transforms the array of image _ids into an array of Strings (the URLs of the images).
Now the thing is I'd like to have at least one image inside the array. That means if the offer object does not have any images (empty array), then I want to react and fill it with the URL of the default image.
It would be great if there's a way to do this with screener as I'd like to keep the logic away from the controller.
Metadata
Metadata
Assignees
Labels
No labels