mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 12:16:37 -04:00
26 lines
563 B
JavaScript
26 lines
563 B
JavaScript
import Posts from "meteor/nova:posts";
|
|
import PublicationUtils from 'meteor/utilities:smart-publications';
|
|
|
|
const alwaysPublic = user => true;
|
|
|
|
Posts.addField([
|
|
{
|
|
fieldName: 'cloudinaryId',
|
|
fieldSchema: {
|
|
type: String,
|
|
optional: true,
|
|
viewableIf: alwaysPublic,
|
|
}
|
|
},
|
|
{
|
|
fieldName: 'cloudinaryUrls',
|
|
fieldSchema: {
|
|
type: [Object],
|
|
optional: true,
|
|
blackbox: true,
|
|
viewableIf: alwaysPublic,
|
|
}
|
|
}
|
|
]);
|
|
|
|
PublicationUtils.addToFields(Posts.publishedFields.list, ["cloudinaryId", "cloudinaryUrls"]);
|