Commit 7ff33d63 authored by Jörg Richter's avatar Jörg Richter

REST client: add queryTopics() method, adapt to Core API

Add 1 method:

    queryTopics (typeUri, value)

See dmx-platform/dmx-platform#341
parent 3125424c
Pipeline #9931 passed with stage
in 1 second
......@@ -64,6 +64,12 @@ export default {
)
},
queryTopics (typeUri, value) {
return http.get(`/core/topic/type/${typeUri}/query/${value}`).then(response =>
utils.instantiateMany(response.data, Topic)
)
},
/**
* Performs a fulltext search.
*
......@@ -75,8 +81,8 @@ export default {
*/
queryTopicsFulltext (query, topicTypeUri, searchChildTopics) {
// suppress error handler as for incremental search the query might be (temporarily) syntactically incorrect
const params = {query, topic_type_uri: topicTypeUri, search_child_topics: searchChildTopics}
return _http.get('/core/topic', {params}).then(response => {
const params = {topic_type_uri: topicTypeUri, search_child_topics: searchChildTopics}
return _http.get(`/core/topic/query/${query}`, {params}).then(response => {
const {query, topicTypeUri, searchChildTopics, topics} = response.data
return {
query, topicTypeUri, searchChildTopics,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment