diff --git a/.env.example b/.env.example index 42dc699..41a14d0 100644 --- a/.env.example +++ b/.env.example @@ -1,5 +1,6 @@ mongoURI=mongodb://localhost:27017 dbo=school +secret= PORT=8000 SYSTEM_EMAIL= SYSTEM_PASSWORD= \ No newline at end of file diff --git a/controllers/authController.go b/controllers/authController.go index 64ac815..af828c2 100644 --- a/controllers/authController.go +++ b/controllers/authController.go @@ -23,7 +23,7 @@ var studentCollection *mongo.Collection = database.OpenCollection(database.Clien var contactCollection *mongo.Collection = database.OpenCollection(database.Client, "contacts") var adminCollection *mongo.Collection = database.OpenCollection(database.Client, "admins") -const SecretKey = "secret" +var SecretKey = os.Getenv("secret") var systemEmail string = os.Getenv("SYSTEM_EMAIL") var systemPassword string = os.Getenv("SYSTEM_PASSWORD")