Skip to content

Commit a35a2ce

Browse files
committed
add api check before getting matches
1 parent 48640e1 commit a35a2ce

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

web-app/src/pages/api.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { UserPreferences } from "./Preferences";
33
const API_URL = process.env.NEXT_PUBLIC_API_URL;
44

55
export const getMatches = async (token: string) => {
6+
// make sure the API is up
7+
await fetch(`${API_URL}`);
8+
69
const response = await fetch(`${API_URL}/matches`, {
710
method: "GET",
811
headers: {

0 commit comments

Comments
 (0)