Skip to content

Commit

Permalink
cleaning up console.log statements
Browse files Browse the repository at this point in the history
  • Loading branch information
qiandrewj committed Oct 31, 2024
1 parent b80dd2d commit 4e3c9f4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 17 deletions.
5 changes: 2 additions & 3 deletions client/src/auth/auth_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import axios from 'axios'
export const setAuthToken = (token: string) => {
Session.setPersistent({ token: token })
if (Session.get('token') !== token) {
console.log('Error saving token to session')
return false
}
return true
Expand Down Expand Up @@ -86,7 +85,7 @@ export function useAuthMandatoryLogin(redirectFrom: string): {
}
}

getEmail().catch((e) => console.log("[ERROR] Failed in authMandatoryLogin: ", e.response))
getEmail().catch((e) => e)
setToken(authToken)
setIsAuthenticating(false)
setIsLoggedIn(true)
Expand Down Expand Up @@ -138,7 +137,7 @@ export function useAuthOptionalLogin(): {
setToken(authToken)
setIsLoggedIn(true)
}
getEmail().catch(e => console.log('[ERROR] Get Email in useAuthOptionalLogin(): ', e));
getEmail().catch(e => e);

}, [])

Expand Down
3 changes: 0 additions & 3 deletions client/src/modules/Course/Components/ReviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ const ReviewModal = ({
}

function handleSubmitReview() {
console.log('tried to submit')
if (validReview()) {
const newReview: NewReview = {
rating: overall,
Expand All @@ -115,8 +114,6 @@ const ReviewModal = ({
major: selectedMajors,
}
submitReview(newReview)

console.log('Submitting')
} else return
}

Expand Down
9 changes: 0 additions & 9 deletions client/src/modules/Results/Components/PreviewCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,7 @@ export default class PreviewCard extends Component {
topReview: {},
numReviews: 0,
})
// eslint-disable-next-line no-console
console.log(
`No professor reviews for course by id = ${this.props.course._id}}`
)
}
} else {
// eslint-disable-next-line no-console
console.log(
`Unable to find reviews by course by id = ${this.props.course._id}`
)
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/Results/Components/ResultsDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default class ResultsDisplay extends Component {
}

getSubjectOptions(inputValue, callback) {
console.log('Deprecated functionality')
console.log()
}

setShowFilterPopup() {
Expand Down
1 change: 0 additions & 1 deletion server/src/admin/admin.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ adminRouter.post('/reviews/get-pending', async (req, res) => {
try {
const { token }: AdminRequestType = req.body;
const auth = new Auth({ token });
console.log(auth)
const reviews = await getPendingReviews({ auth });
if (reviews === null) {
return res.status(400).json({
Expand Down

0 comments on commit 4e3c9f4

Please sign in to comment.