flag를 flagx로 대체
This commit is contained in:
@ -20,7 +20,6 @@ import (
|
||||
|
||||
common "repositories.action2quare.com/ayo/gocommon"
|
||||
"repositories.action2quare.com/ayo/gocommon/logger"
|
||||
"repositories.action2quare.com/ayo/maingate/flag"
|
||||
|
||||
"go.mongodb.org/mongo-driver/bson"
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
@ -76,7 +75,7 @@ func (fd *fileDocumentDesc) save() error {
|
||||
}
|
||||
|
||||
func (caller apiCaller) isAdmin() bool {
|
||||
if *flag.Noauth {
|
||||
if *noauth {
|
||||
return true
|
||||
}
|
||||
|
||||
@ -389,7 +388,7 @@ func (mg *Maingate) api(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var userinfo map[string]any
|
||||
|
||||
if !*flag.Noauth {
|
||||
if !*noauth {
|
||||
authheader := r.Header.Get("Authorization")
|
||||
if len(authheader) == 0 {
|
||||
logger.Println("Authorization header is not valid :", authheader)
|
||||
|
||||
Reference in New Issue
Block a user