mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 20:18:23 -05:00
DEV: Add plugin API to extend search results (#12966)
This commit is contained in:
@@ -20,7 +20,7 @@ export default DiscourseRoute.extend({
|
||||
search_type: params.searchType,
|
||||
term: params.term,
|
||||
},
|
||||
}).then((json) => {
|
||||
}).then(async (json) => {
|
||||
// Add zero values for missing dates
|
||||
if (json.term.data.length > 0) {
|
||||
const startDate =
|
||||
@@ -31,7 +31,9 @@ export default DiscourseRoute.extend({
|
||||
json.term.data = fillMissingDates(json.term.data, startDate, endDate);
|
||||
}
|
||||
if (json.term.search_result) {
|
||||
json.term.search_result = translateResults(json.term.search_result);
|
||||
json.term.search_result = await translateResults(
|
||||
json.term.search_result
|
||||
);
|
||||
}
|
||||
|
||||
const model = EmberObject.create({ type: "search_log_term" });
|
||||
|
||||
Reference in New Issue
Block a user