Skip to content

Commit

Permalink
Update certificate and key file paths in main.go and config.go
Browse files Browse the repository at this point in the history
  • Loading branch information
waveyboym committed Jun 14, 2024
1 parent 5244476 commit 09f795b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Binary file modified occupi-backend/.dev.env.gpg
Binary file not shown.
Binary file modified occupi-backend/.prod.env.gpg
Binary file not shown.
2 changes: 1 addition & 1 deletion occupi-backend/cmd/occupi-backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
keyFile := configs.GetKeyFileName()

// fatal error if the cert or key file is not found
if certFile == "CERT_FILE_NAME" || keyFile == "KEY_FILE_NAME" {
if certFile == "CERTIFICATE_FILE_PATH" || keyFile == "KEY_FILE_PATH" {
logrus.Fatal("Cert or Key file not found")
}

Expand Down
8 changes: 4 additions & 4 deletions occupi-backend/configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,18 @@ func GetSMTPHost() string {

// gets the certificate file name as defined in the .env file
func GetCertFileName() string {
certFileName := os.Getenv("CERT_FILE_NAME")
certFileName := os.Getenv("CERTIFICATE_FILE_PATH")
if certFileName == "" {
certFileName = "CERT_FILE_NAME"
certFileName = "CERTIFICATE_FILE_PATH"
}
return certFileName
}

// gets the key file name as defined in the .env file
func GetKeyFileName() string {
keyFileName := os.Getenv("KEY_FILE_NAME")
keyFileName := os.Getenv("KEY_FILE_PATH")
if keyFileName == "" {
keyFileName = "KEY_FILE_NAME"
keyFileName = "KEY_FILE_PATH"
}
return keyFileName
}
Expand Down

0 comments on commit 09f795b

Please sign in to comment.