Skip to content

Commit

Permalink
wz added comments for andrew to do
Browse files Browse the repository at this point in the history
  • Loading branch information
qiandrewj committed May 7, 2024
1 parent 46f7594 commit c530756
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client/src/modules/Admin/Components/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ export const Admin = () => {
// Call when user asks to un-report a reported review. Accesses the Reviews database
// and changes the reported flag for this review to false.
function unReportReview(review: Review) {

//wz
axios
.post('/api/reviews/unreport', {
review: review,
Expand All @@ -157,7 +159,7 @@ export const Admin = () => {
setDisableNewSem(true)
setDisableInit(true)
setLoadingSemester(1)

//wz
axios
.post('/api/admin/semester/add', {
semester,
Expand Down Expand Up @@ -188,7 +190,7 @@ export const Admin = () => {

setDisableInit(true)
setLoadingInit(1)

//wz
axios.post('/api/admin/db/initialize', { token: token }).then((response) => {
if (response.status === 200) {
setDisableInit(false)
Expand All @@ -203,6 +205,7 @@ export const Admin = () => {
console.log('Updating professors')
setDisableInit(true)
setLoadingProfs(1)
//wz

axios.post('/api/admin/professors/add', { token: token }).then((response) => {
if (response.status === 200) {
Expand All @@ -219,7 +222,7 @@ export const Admin = () => {
console.log('Setting the professors to an empty array')
setDisableInit(true)
setResettingProfs(1)

// wz
axios.post('/api/admin/professors/reset', { token: token }).then((response) => {
if (response.status === 200) {
console.log('Reset all the professors to empty arrays')
Expand Down Expand Up @@ -275,9 +278,6 @@ export const Admin = () => {
}
}

function toSelectOptions(options: string[] | undefined) {
return options?.map((option) => ({ value: option, label: option })) || []
}

function renderAdmin(token: string) {
return (
Expand Down

0 comments on commit c530756

Please sign in to comment.