Skip to content

Commit

Permalink
chore: migrate to new tracker API
Browse files Browse the repository at this point in the history
  • Loading branch information
kabaros committed Nov 3, 2023
1 parent 096eff8 commit 3963316
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/EventExport/form-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const onExport = (baseUrl, setExportEnabled) => (values) => {
} = values

// generate URL and redirect
const apiBaseUrl = `${baseUrl}/api/`
const apiBaseUrl = `${baseUrl}/api/tracker/`
const endpoint = `events`
const endpointExtension = compression ? `${format}.${compression}` : format
const filename = `${endpoint}.${endpointExtension}`
Expand Down
6 changes: 3 additions & 3 deletions src/pages/TEIExport/form-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const valuesToParams = (
// include selected org.units only when manual selection is selected
// ouMode is then stored in the `inclusion` field
if (ouMode === OU_MODE_MANUAL_VALUE) {
minParams.ou = selectedOrgUnits.map((o) => pathToId(o)).join(';')
minParams.orgUnit = selectedOrgUnits.map((o) => pathToId(o)).join(';')
minParams.ouMode = inclusion
}

Expand Down Expand Up @@ -111,8 +111,8 @@ const onExport = (baseUrl, setExportEnabled) => async (values) => {
const { format } = values

// generate URL and redirect
const apiBaseUrl = `${baseUrl}/api/`
const endpoint = `trackedEntityInstances`
const apiBaseUrl = `${baseUrl}/api/tracker/`
const endpoint = `trackedEntities`
const filename = `${endpoint}.${format}`
const downloadUrlParams = valuesToParams(values, filename)
const url = `${apiBaseUrl}${endpoint}.${format}?${downloadUrlParams}`
Expand Down

0 comments on commit 3963316

Please sign in to comment.