-
Notifications
You must be signed in to change notification settings - Fork 17
Hotfix document search http #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| routes[controller][action] = getCorrectRoute(http); | ||
| } | ||
| else if (http && http.length > 1) { | ||
| // We need this ugly fix because the document:search route can also |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it missing one word to fully understand those 2 first comment ?
Codecov Report
@@ Coverage Diff @@
## 7-dev #498 +/- ##
=======================================
Coverage 95.79% 95.79%
=======================================
Files 32 32
Lines 1308 1309 +1
=======================================
+ Hits 1253 1254 +1
Misses 55 55
Continue to review full report at Codecov.
|
# [7.1.2](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.1.2) (2020-03-31) #### Bug fixes - [ [#498](#498) ] Hotfix document search http ([Aschen](https://github.com/Aschen)) #### Enhancements - [ [#496](#496) ] Exposes SearchResult classes ([Aschen](https://github.com/Aschen)) ---
What does this PR do?
When we have multiple choose for a route, we choose the shortest or the GET route.
With
document:createwe have the choice between those 2 routes:The problem is that after even if we want to change the verb by using
options.verb, the URL is not the good one andGET /:index/:collectioncorrespond to thecollection:createmethod.So this PR is just a dirty fix to always use the POST route with
document:search.When we are going to fully support the GET verb with query for
document:search, maybe we can get ride of this.See this failing job on Kuzzle: https://travis-ci.org/github/kuzzleio/kuzzle/jobs/667658863