Skip to content

Commit

Permalink
refactor: move resourceMap to outside of fn
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Mar 5, 2024
1 parent 45ed729 commit f89b3c5
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ const reducer = (state, action) => {
}
}

const resourceMap = {
[OUTPUT_TYPE_TRACKED_ENTITY]: 'analytics/trackedEntities/query/dimensions',
[OUTPUT_TYPE_ENROLLMENT]: 'analytics/enrollments/query/dimensions',
[OUTPUT_TYPE_EVENT]: 'analytics/events/query/dimensions',
}

const createDimensionsQuery = ({
inputType,
page,
Expand All @@ -79,12 +85,6 @@ const createDimensionsQuery = ({
dimensionType,
nameProp,
}) => {
const resourceMap = {
[OUTPUT_TYPE_TRACKED_ENTITY]:
'analytics/trackedEntities/query/dimensions',
[OUTPUT_TYPE_ENROLLMENT]: 'analytics/enrollments/query/dimensions',
[OUTPUT_TYPE_EVENT]: 'analytics/events/query/dimensions',
}
const params = {
pageSize: 50,
page,
Expand Down

0 comments on commit f89b3c5

Please sign in to comment.