SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 01c15e6e authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

Tweak routes to avoid redirects

parent 86d59a49
No related branches found
No related tags found
No related merge requests found
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
const filteringFieldsAdvanced = ref([]) const filteringFieldsAdvanced = ref([])
const fetchFilteringFields = async () => { const fetchFilteringFields = async () => {
fetch(`/api/${props.url}/filtering_options`, {headers: headers}) fetch(`/api/${props.url}/filtering_options/`, {headers: headers})
.then(stream => stream.json()) .then(stream => stream.json())
.then(data => { .then(data => {
filteringFieldsBasic.value = data.basic filteringFieldsBasic.value = data.basic
...@@ -486,7 +486,7 @@ export default { ...@@ -486,7 +486,7 @@ export default {
fetchingObjects.value = true fetchingObjects.value = true
errorFetchingObjects.value = null errorFetchingObjects.value = null
try { try {
const response = await fetch(`/api/${props.url}${queryParameters.value}`, {headers: headers}) const response = await fetch(`/api/${props.url}/${queryParameters.value}`, {headers: headers})
const json = await response.json() const json = await response.json()
objects.value = json.results objects.value = json.results
totalRows.value = json.count totalRows.value = json.count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment