Updating Config to a more protected access paradigm
This commit is contained in:
@@ -493,7 +493,7 @@ func StarterAdmin() gin.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
go util.SendEmail("Admin Created", "A new admin, "+a.Email+", has been created", config.Config.AdminEmails)
|
||||
go util.SendEmail("Admin Created", "A new admin, "+a.Email+", has been created", config.Config().AdminEmails)
|
||||
|
||||
c.JSON(http.StatusOK, util.NextMsg{Next: "db verify"})
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ var unauthLoaded = false
|
||||
func UnauthRateLimit() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
if !unauthLoaded {
|
||||
unauthed.loadFromConfig(config.GetConfigPath(config.Config.UnauthedRateLimitConfig))
|
||||
unauthed.loadFromConfig(config.GetConfigPath(config.Config().UnauthedRateLimitConfig))
|
||||
unauthLoaded = true
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ var authLoaded = false
|
||||
func AuthedRateLimit() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
if !authLoaded {
|
||||
authed.loadFromConfig(config.GetConfigPath(config.Config.AuthedRateLimitConfig))
|
||||
authed.loadFromConfig(config.GetConfigPath(config.Config().AuthedRateLimitConfig))
|
||||
authLoaded = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user