fix: rename root_secret -> admin_secret

This commit is contained in:
Lakhan Samani
2021-07-28 18:38:04 +05:30
parent 2cda3ca8f4
commit 87bfb821d6
3 changed files with 5 additions and 5 deletions

View File

@@ -6,10 +6,10 @@ import (
)
func IsSuperAdmin(gc *gin.Context) bool {
secret := gc.Request.Header.Get("x-authorizer-root-secret")
secret := gc.Request.Header.Get("x-authorizer-admin-secret")
if secret == "" {
return false
}
return secret == constants.ROOT_SECRET
return secret == constants.ADMIN_SECRET
}