Skip to content
Snippets Groups Projects
Commit 61fc5f55 authored by Paul Pestov's avatar Paul Pestov
Browse files

feat: set real search API URL

closes #66
parent 1e38a819
No related branches found
No related tags found
1 merge request!26Enable search using real data
......@@ -15,33 +15,15 @@ class ApiService {
}
async search(value) {
// TODO: Uncomment this when the real search endpoint is ready
// return this.request('/search', 'POST', {
// query: {
// simple_query_string: {
// query: value
// }
// },
// from: 0,
// size: 10
// })
return Promise.resolve({
"hits" : {
"total" : {
"value" : 2
},
"hits" : [{
"item": "/api/textapi/ahikar/syriac/3r678-186v/latest/item.json",
"label": "Cod. Arab. 236 Copenhagen",
"n": "123v"
}, {
"item": "/api/textapi/ahikar/syriac/3r678-126r/latest/item.json",
"label": "Cod. Arab. 236 Copenhagen",
"n": "126r"
}]
return this.request('/search', 'POST', {
query: {
simple_query_string: {
query: value
}
},
"took" : 1
});
from: 0,
size: 10
})
}
async request (url, method, data, params) {
......@@ -54,4 +36,4 @@ class ApiService {
}
}
export default new ApiService('/');
export default new ApiService('https://ahikar-dev.sub.uni-goettingen.de/api');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment