Vulcan/packages/vulcan-embedly/lib/modules/custom_fields.js

48 lines
898 B
JavaScript
Raw Normal View History

import EmbedlyURL from '../components/EmbedlyURL.jsx';
2017-03-23 16:27:59 +09:00
import Posts from "meteor/vulcan:posts";
2016-03-27 18:17:20 +09:00
Posts.addField([
2016-04-07 12:43:41 +09:00
{
fieldName: 'url',
fieldSchema: {
control: EmbedlyURL, // we are just extending the field url, not replacing it
2016-04-07 12:43:41 +09:00
}
},
2016-03-27 18:17:20 +09:00
{
fieldName: 'thumbnailUrl',
fieldSchema: {
type: String,
optional: true,
insertableBy: ['members'],
editableBy: ['members'],
viewableBy: ['guests'],
hidden: true
2016-03-27 18:17:20 +09:00
}
},
{
fieldName: 'media',
fieldSchema: {
type: Object,
optional: true,
blackbox: true,
viewableBy: ['guests'],
2016-03-27 18:17:20 +09:00
}
},
{
fieldName: 'sourceName',
fieldSchema: {
type: String,
optional: true,
viewableBy: ['guests'],
2016-03-27 18:17:20 +09:00
}
},
{
fieldName: 'sourceUrl',
fieldSchema: {
type: String,
optional: true,
viewableBy: ['guests'],
2016-03-27 18:17:20 +09:00
}
}
]);