-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from avantifellows/home-page
Home page
- Loading branch information
Showing
6 changed files
with
242 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import axios from 'axios'; | ||
|
||
const url = process.env.NEXT_PUBLIC_AF_DB_SERVICE_URL; | ||
const bearerToken = process.env.NEXT_PUBLIC_AF_DB_SERVICE_BEARER_TOKEN; | ||
|
||
export const getSessionOccurrences = async () => { | ||
try { | ||
const response = await axios.get(`${url}/session-occurrence`, { | ||
headers: { | ||
'Authorization': `Bearer ${bearerToken}` | ||
} | ||
}); | ||
return response.data; | ||
} catch (error) { | ||
console.error("Error in fetching Session Occurrence:", error); | ||
throw error; | ||
} | ||
}; | ||
|
||
export const getSessions = async (sessionId: number) => { | ||
try { | ||
const response = await axios.get(`${url}/session/${sessionId}`, { | ||
headers: { | ||
'Authorization': `Bearer ${bearerToken}` | ||
} | ||
}); | ||
return response.data; | ||
} catch (error) { | ||
console.error("Error in fetching Session Details:", error); | ||
throw error; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters