100devs/course-tracker

Bug - Auth.js inside middleware

Closed this issue · 0 comments

An issue in auth.js inside the middleware for server side. The conditionals has two if statements that's going through at the same time, so it was sending out a double response which is causing error to reach endpoints.

Possible fixes:

  • Add return at the end of the first if statement to stop it from going to the second conditional
    or
  • Update syntax to else if for the second if statement.