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

dont display ui when logged out #401

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/src/slices/healthSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ type FetchHealthStatusResponse = {
// Fetch health status and transform it to further use
export const fetchHealthStatus = createAsyncThunk('health/fetchHealthStatus', async () => {
const res = await axios.get<FetchHealthStatusResponse>("/services/health.json");
schuettloeffel-elsa marked this conversation as resolved.
Show resolved Hide resolved

// When http response is not 200, it is likely we are not logged in, so lets redirect to login
if(res.status != 200) {
window.location.href = "/login.html";
}

return res.data;
});

Expand Down
Loading