Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beacon: use a different overview endpoint #144

Merged
merged 2 commits into from
Jan 15, 2024

Conversation

gsfk
Copy link
Member

@gsfk gsfk commented Jan 11, 2024

Change beacon overview endpoint to /overview (Redmine #1859)

@@ -7,7 +7,7 @@ import { printAPIError } from '@/utils/error.util';
export const getBeaconConfig = createAsyncThunk<BeaconConfigResponse, void, { state: RootState; rejectValue: string }>(
'beaconConfig/getBeaconConfig',
(_, { getState, rejectWithValue }) => {
const beaconInfoEndpoint = getState()?.config?.beaconUrl + '/info';
const beaconInfoEndpoint = getState()?.config?.beaconUrl + '/overview';
Copy link
Member

Choose a reason for hiding this comment

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

we should probably reject this if beaconUrl is undefined, but since the behaviour is already like this, this PR is good to merge

Copy link
Member Author

Choose a reason for hiding this comment

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

The UI isn't rendered until beaconUrl is defined, so it would be hard to get into this state.

Copy link
Member

Choose a reason for hiding this comment

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

it's more that having the question marks sort of implies that it can somehow

also it's unneeded to have a ? after getState() and config I think anyway, since getState.config should always return an object...

Copy link
Member Author

@gsfk gsfk Jan 11, 2024

Choose a reason for hiding this comment

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

This was probably a code copying crime on my part, removing.

@gsfk gsfk merged commit 5625c21 into main Jan 15, 2024
2 checks passed
@davidlougheed davidlougheed deleted the features/beacon-overview-endpoint branch February 8, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants