mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 15:43:59 +08:00
21 lines
347 B
JavaScript
21 lines
347 B
JavaScript
|
import Ember from 'ember';
|
||
|
|
||
|
var PostResult = Ember.ObjectProxy.extend({
|
||
|
|
||
|
relevantContent: ''
|
||
|
|
||
|
});
|
||
|
|
||
|
PostResult.reopenClass({
|
||
|
create: function(post) {
|
||
|
if (!post) return null;
|
||
|
|
||
|
var result = this._super();
|
||
|
result.set('content', post);
|
||
|
result.set('relevantContent', post.get('content'));
|
||
|
return result;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default PostResult;
|