Commit a3c07c670958b79a74cb5d71ff34dd9a5e97136d
1 parent
e927e777
Exists in
master
and in
6 other branches
Fix: path for search api
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/app/components/article-service/article.service.js
@@ -13,6 +13,7 @@ | @@ -13,6 +13,7 @@ | ||
13 | apiArticles: $rootScope.basePath + '/api/v1/articles/', | 13 | apiArticles: $rootScope.basePath + '/api/v1/articles/', |
14 | apiCommunities: $rootScope.basePath + '/api/v1/communities/', | 14 | apiCommunities: $rootScope.basePath + '/api/v1/communities/', |
15 | apiProposals: $rootScope.basePath + '/api/v1/proposals_discussion_plugin/', | 15 | apiProposals: $rootScope.basePath + '/api/v1/proposals_discussion_plugin/', |
16 | + apiSearch: $rootScope.basePath + '/api/v1/search/', | ||
16 | getArticleById: getArticleById, | 17 | getArticleById: getArticleById, |
17 | getArticleBySlug: getArticleBySlug, | 18 | getArticleBySlug: getArticleBySlug, |
18 | getCategories: getCategories, | 19 | getCategories: getCategories, |
@@ -234,7 +235,7 @@ | @@ -234,7 +235,7 @@ | ||
234 | 235 | ||
235 | function searchTopics (params, cbSuccess, cbError) { | 236 | function searchTopics (params, cbSuccess, cbError) { |
236 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Topic&query=cisternas | 237 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Topic&query=cisternas |
237 | - var url = '/api/v1/search/article'; | 238 | + var url = service.apiSearch + '/article'; |
238 | var paramsExtended = angular.extend({ | 239 | var paramsExtended = angular.extend({ |
239 | // 'fields[]': ['id', 'title', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'], | 240 | // 'fields[]': ['id', 'title', 'slug', 'abstract', 'categories', 'setting', 'children_count', 'hits'], |
240 | 'type': 'ProposalsDiscussionPlugin::Topic' | 241 | 'type': 'ProposalsDiscussionPlugin::Topic' |
@@ -249,7 +250,7 @@ | @@ -249,7 +250,7 @@ | ||
249 | 250 | ||
250 | function searchProposals (params, cbSuccess, cbError) { | 251 | function searchProposals (params, cbSuccess, cbError) { |
251 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Proposal&query=cisternas | 252 | // Ex.: /api/v1/search/article?type=ProposalsDiscussionPlugin::Proposal&query=cisternas |
252 | - var url = '/api/v1/search/article'; | 253 | + var url = service.apiSearch + '/article'; |
253 | var paramsExtended = angular.extend({ | 254 | var paramsExtended = angular.extend({ |
254 | page: 1, | 255 | page: 1, |
255 | per_page: 20, | 256 | per_page: 20, |