Vulcan/packages/example-forum/lib/modules/posts/embedly.js

46 lines
840 B
JavaScript
Raw Normal View History

import Posts from '../posts/index.js';
2016-03-27 18:17:20 +09:00
Posts.addField([
2016-04-07 12:43:41 +09:00
{
fieldName: 'url',
fieldSchema: {
2017-09-16 22:26:52 +02:00
control: 'EmbedURL', // 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
}
}
2017-09-04 19:56:33 +09:00
]);