Commit b2c9e7b5 authored by Jörg Richter's avatar Jörg Richter

REST client: adapt 3 get/query-topics plural requests

See dmx-platform/dmx-platform#341
parent 7ff33d63
Pipeline #9947 passed with stage
in 1 second
......@@ -6,7 +6,7 @@ import typeCache from './type-cache'
import permCache from './permission-cache'
import utils from './utils'
console.log('[DMX] Client Library 2020/04/27')
console.log('[DMX] Client Library 2020/04/28')
export default {
......
......@@ -27,19 +27,19 @@ export default {
children: includeChildren,
assoc_children: includeAssocChildren
}}).then(response =>
new Topic(response.data)
new Topic(response.data) // FIXME: no result
)
},
getTopicsByType (typeUri) {
return http.get(`/core/topic/type/${typeUri}`).then(response =>
return http.get(`/core/topics/type/${typeUri}`).then(response =>
utils.instantiateMany(response.data, Topic)
)
},
getTopicByValue (typeUri, value) {
return http.get(`/core/topic/type/${typeUri}/${value}`).then(response =>
new Topic(response.data)
new Topic(response.data) // FIXME: no result
)
},
......@@ -65,7 +65,7 @@ export default {
},
queryTopics (typeUri, value) {
return http.get(`/core/topic/type/${typeUri}/query/${value}`).then(response =>
return http.get(`/core/topics/type/${typeUri}/query/${value}`).then(response =>
utils.instantiateMany(response.data, Topic)
)
},
......@@ -82,7 +82,7 @@ export default {
queryTopicsFulltext (query, topicTypeUri, searchChildTopics) {
// suppress error handler as for incremental search the query might be (temporarily) syntactically incorrect
const params = {topic_type_uri: topicTypeUri, search_child_topics: searchChildTopics}
return _http.get(`/core/topic/query/${query}`, {params}).then(response => {
return _http.get(`/core/topics/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