added 260907 version of worker toolkit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
const {
|
||||
set,
|
||||
getProperties,
|
||||
} = Ember;
|
||||
|
||||
export default Ember.Mixin.create({
|
||||
performSearch(term, resolve, reject) {
|
||||
this
|
||||
.searchByTerm('topic', term)
|
||||
.then((topics) => {
|
||||
set(this, 'foundTopics', topics);
|
||||
resolve(topics);
|
||||
}, reject);
|
||||
},
|
||||
|
||||
actions: {
|
||||
goToTopic(topic) {
|
||||
const { id, modelType } = getProperties(topic, 'id', 'modelType');
|
||||
|
||||
this.transitionToRoute('posts.topic', modelType, id);
|
||||
},
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user