-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #7 Revamped Admin priviledges
Signed-off-by: Akash <[email protected]>
- Loading branch information
1 parent
9c3d44a
commit 03af599
Showing
1 changed file
with
2 additions
and
2 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 |
---|---|---|
|
@@ -24,8 +24,8 @@ const AdminPage = () => { | |
fetchQuizData(); | ||
onAuthStateChanged(auth, (user) => { | ||
if (user) { | ||
if (user.providerData[0].email === '[email protected]' || user.providerData[0].email === '[email protected]') { | ||
console.log(user.uid) | ||
//these are the admin user uid's. Yes i wrote it in the code. Go cry about it. | ||
if (user.uid === 'faNLMo6zT2XhXH0dTBaJQunXe9B3' || user.uid === 'BiiqrNezHSM8NTF1P5yNkkX4x8F2') { | ||
setUser(user); | ||
} else { | ||
toast.error("Unauthorized :("); | ||
|