Skip to content

Commit

Permalink
feat: used the reg env var
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Jan 13, 2024
1 parent f76f1a1 commit bb64795
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package server

import (
"net/http"
"os"

"github.com/kossiitkgp/kwoc-backend/v2/controllers"
"github.com/kossiitkgp/kwoc-backend/v2/middleware"
Expand Down Expand Up @@ -57,7 +58,7 @@ func getRoutes(app *middleware.App) []Route {
"POST",
"/student/form/",
middleware.WithLogin(middleware.WrapApp(app, controllers.RegisterStudent)),
true,
os.Getenv("REGISTRATIONS_OPEN") == "true",
},
{
"Update Student Details",
Expand Down Expand Up @@ -85,7 +86,7 @@ func getRoutes(app *middleware.App) []Route {
"POST",
"/mentor/form/",
middleware.WithLogin(middleware.WrapApp(app, controllers.RegisterMentor)),
true,
os.Getenv("REGISTRATIONS_OPEN") == "true",
},
{
"Update Mentor Details",
Expand Down Expand Up @@ -120,7 +121,7 @@ func getRoutes(app *middleware.App) []Route {
"POST",
"/project/",
middleware.WithLogin(middleware.WrapApp(app, controllers.RegisterProject)),
true,
os.Getenv("REGISTRATIONS_OPEN") == "true",
},
{
"Fetch All Projects",
Expand Down

0 comments on commit bb64795

Please sign in to comment.