discourse/app/assets/javascripts/discourse/adapters/topic.js.es6
2016-07-11 12:57:05 -04:00

13 lines
336 B
JavaScript

import { ajax } from 'discourse/lib/ajax';
import RestAdapter from 'discourse/adapters/rest';
export default RestAdapter.extend({
find(store, type, findArgs) {
if (findArgs.similar) {
return ajax("/topics/similar_to", { data: findArgs.similar });
} else {
return this._super(store, type, findArgs);
}
}
});