Skip to content

Commit

Permalink
Add documentation frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquelinecai committed Dec 8, 2024
1 parent 38f7666 commit 8a693c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/src/modules/Admin/Components/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const Admin = () => {
const [loading, setLoading] = useState(true);
const [isAdmin, setIsAdmin] = useState(false);

/**
* Confirms if the logged-in user is an admin
*/
useEffect(() => {
async function confirmAdmin() {
const response = await axios.post(`/api/admin/token/validate`, {
Expand Down Expand Up @@ -334,6 +337,10 @@ export const Admin = () => {
}
}

/**
* Call when admin wants to update the similar courses data when clicking the
* "Update Similarity Data" button
*/
async function updateSimilarityData() {
console.log('Updatng course similarity data')
setUpdating(true)
Expand Down

0 comments on commit 8a693c9

Please sign in to comment.