(FIX): Forgot to update this. Need to change cookies too.
This commit is contained in:
parent
9d16f44b00
commit
296f32aa6d
@ -28,9 +28,6 @@ type Server struct {
|
||||
// Init initializes the server with the provided port. CORS settings are defined here.
|
||||
// A pointer to a server object is returned which allows for method chaining.
|
||||
func Init(port int) *Server {
|
||||
// TODO: Set this to release in prod
|
||||
gin.SetMode(gin.DebugMode)
|
||||
|
||||
server := &Server{
|
||||
Router: gin.Default(),
|
||||
port: port,
|
||||
@ -66,6 +63,14 @@ func (s *Server) Setup() *Server {
|
||||
panic("Environment configuration is nil, crashing.")
|
||||
}
|
||||
|
||||
if cfg.Environment == "dev" {
|
||||
gin.SetMode(gin.DebugMode)
|
||||
} else if cfg.Environment == "prod" {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
} else {
|
||||
gin.SetMode(gin.TestMode)
|
||||
}
|
||||
|
||||
// SETUP GOOGLE AUTH
|
||||
var (
|
||||
redirectUrl string = fmt.Sprintf("%s%s", cfg.Domain, domain.API_AUTH_CALLBACK)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user