2016-04-07 12:43:41 +09:00
|
|
|
import EmbedlyURL from './components/EmbedlyURL.jsx';
|
2016-04-07 22:21:01 +09:00
|
|
|
import ThumbnailURL from './components/ThumbnailURL.jsx';
|
2016-06-23 11:40:35 +09:00
|
|
|
import Posts from "meteor/nova:posts";
|
2016-10-30 18:25:51 +01:00
|
|
|
|
2016-03-27 18:17:20 +09:00
|
|
|
Posts.addField([
|
2016-04-07 12:43:41 +09:00
|
|
|
{
|
|
|
|
fieldName: 'url',
|
|
|
|
fieldSchema: {
|
2017-01-23 15:50:55 +01:00
|
|
|
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,
|
2016-12-06 10:55:47 +01:00
|
|
|
insertableBy: ['members'],
|
|
|
|
editableBy: ['members'],
|
|
|
|
viewableBy: ['guests'],
|
2016-03-27 18:17:20 +09:00
|
|
|
publish: true,
|
2016-04-07 22:21:01 +09:00
|
|
|
control: ThumbnailURL
|
2016-03-27 18:17:20 +09:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldName: 'media',
|
|
|
|
fieldSchema: {
|
|
|
|
type: Object,
|
|
|
|
publish: true,
|
|
|
|
optional: true,
|
2016-10-30 18:25:51 +01:00
|
|
|
blackbox: true,
|
2016-12-06 10:55:47 +01:00
|
|
|
viewableBy: ['guests'],
|
2016-03-27 18:17:20 +09:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldName: 'sourceName',
|
|
|
|
fieldSchema: {
|
|
|
|
type: String,
|
|
|
|
optional: true,
|
|
|
|
publish: true,
|
2016-12-06 10:55:47 +01:00
|
|
|
viewableBy: ['guests'],
|
2016-03-27 18:17:20 +09:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
fieldName: 'sourceUrl',
|
|
|
|
fieldSchema: {
|
|
|
|
type: String,
|
|
|
|
optional: true,
|
|
|
|
publish: true,
|
2016-12-06 10:55:47 +01:00
|
|
|
viewableBy: ['guests'],
|
2016-03-27 18:17:20 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]);
|