Skip to content

Commit

Permalink
Enable status check again (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
duogenesis authored Apr 29, 2024
1 parent 1294f4f commit c26b7ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
DUO_API_URL: https://api.duolicious.app
DUO_CHAT_URL: wss://chat.duolicious.app
DUO_IMAGES_URL: https://user-images.duolicious.app
DUO_STATUS_URL: https://status.duolicious.app
DUO_STATUS_URL: https://duolicious-status.pages.dev
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand Down
8 changes: 2 additions & 6 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ const App = () => {
}, []);

const fetchServerStatusState = useCallback(async () => {
// TODO: Remove this
setServerStatus("ok");
return;

const response = await japi('GET', STATUS_URL);
const response = await fetch(STATUS_URL);
if (!response.ok) {
// If even the status server is down, things are *very* not-okay. But odds
// are it can't be contacted because the user has a crappy internet
Expand All @@ -202,7 +198,7 @@ const App = () => {
return;
}

const j = response.json;
const j: any = await response.json();
const apiVersion = j.api_version;
const reportedStatus = j.statuses[j.status_index];

Expand Down

0 comments on commit c26b7ae

Please sign in to comment.