Vulcan/packages/nova-cloudinary/lib/custom_fields.js

30 lines
510 B
JavaScript
Raw Normal View History

import Posts from "meteor/nova:posts";
2016-05-31 10:53:23 +09:00
Posts.addField([
{
2016-07-11 11:47:00 +09:00
fieldName: 'cloudinaryId',
2016-05-31 10:53:23 +09:00
fieldSchema: {
type: String,
optional: true,
viewableBy: ['guests'],
2016-05-31 10:53:23 +09:00
}
2016-07-11 11:47:00 +09:00
},
{
fieldName: 'cloudinaryUrls',
fieldSchema: {
type: Array,
blackbox: true,
optional: true,
viewableBy: ['guests'],
resolveAs: 'cloudinaryUrls: [JSON]',
2016-07-11 11:47:00 +09:00
}
},
{
fieldName: 'cloudinaryUrls.$',
fieldSchema: {
type: Object,
optional: true
}
2016-05-31 10:53:23 +09:00
}
]);