Skip to content

Commit

Permalink
fix: Update endpoint getEnvironment RTK response (#2968)
Browse files Browse the repository at this point in the history
  • Loading branch information
novakzaballa authored Nov 14, 2023
1 parent 716f6a9 commit 3993823
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions frontend/common/services/useEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ export async function getEnvironment(
typeof environmentService.endpoints.getEnvironment.initiate
>[1],
) {
store.dispatch(
return store.dispatch(
environmentService.endpoints.getEnvironment.initiate(data, options),
)
return Promise.all(
store.dispatch(environmentService.util.getRunningQueriesThunk()),
)
}
// END OF FUNCTION_EXPORTS

Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/SegmentOverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class TheComponent extends Component {
id: this.props.environmentId,
}).then((res) => {
this.setState({
totalSegmentOverrides: res[0].data.total_segment_overrides,
totalSegmentOverrides: res.data.total_segment_overrides,
})
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ class SegmentOverridesInnerAdd extends Component {

getEnvironment(getStore(), { id }).then((res) => {
this.setState({
totalSegmentOverrides: res[1].data.total_segment_overrides,
totalSegmentOverrides: res.data.total_segment_overrides,
})
})
}
Expand Down

3 comments on commit 3993823

@vercel
Copy link

@vercel vercel bot commented on 3993823 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3993823 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs-git-main-flagsmith.vercel.app
docs-flagsmith.vercel.app
docs.flagsmith.com
docs.bullet-train.io

@vercel
Copy link

@vercel vercel bot commented on 3993823 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.