| ... |
... |
@@ -55,8 +55,8 @@ |
| 55 |
55 |
function searchWithAdministratorFilter(term) { |
| 56 |
56 |
let xwikiSpace = ""; |
| 57 |
57 |
// parameters are set according to ticked filter. Hardcoded for POC |
| 58 |
|
- Promise.all( |
| 59 |
|
- fetch("/rest/v1/collabs?roles=administrator"), |
|
58 |
+ Promise.all([ |
|
59 |
+ fetch("/rest/v1/collabs?roles=administrator").then(res => res.json()), |
| 60 |
60 |
fetch("/bin/get/XWiki/SuggestSolrService", { |
| 61 |
61 |
method: "POST", |
| 62 |
62 |
body: { |
| ... |
... |
@@ -68,8 +68,8 @@ |
| 68 |
68 |
`fq=space:Collabs${xwikiSpace}.*` |
| 69 |
69 |
].join('\n'), |
| 70 |
70 |
input: term |
| 71 |
|
- }}) |
| 72 |
|
- ).then(res => console.log("Search with administrator", res)) |
|
71 |
+ }}).then(res => res.text()) |
|
72 |
+ ]).then(([collabs, results]) => console.log(collabs, results)) |
| 73 |
73 |
} |
| 74 |
74 |
}); |
| 75 |
75 |
|