(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.
|
// 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.
|
// A pointer to a server object is returned which allows for method chaining.
|
||||||
func Init(port int) *Server {
|
func Init(port int) *Server {
|
||||||
// TODO: Set this to release in prod
|
|
||||||
gin.SetMode(gin.DebugMode)
|
|
||||||
|
|
||||||
server := &Server{
|
server := &Server{
|
||||||
Router: gin.Default(),
|
Router: gin.Default(),
|
||||||
port: port,
|
port: port,
|
||||||
@ -66,6 +63,14 @@ func (s *Server) Setup() *Server {
|
|||||||
panic("Environment configuration is nil, crashing.")
|
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
|
// SETUP GOOGLE AUTH
|
||||||
var (
|
var (
|
||||||
redirectUrl string = fmt.Sprintf("%s%s", cfg.Domain, domain.API_AUTH_CALLBACK)
|
redirectUrl string = fmt.Sprintf("%s%s", cfg.Domain, domain.API_AUTH_CALLBACK)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user