flag를 flagx로 대체

This commit is contained in:
2023-06-21 14:33:29 +09:00
parent 2399f8cd27
commit 7cd5211779
7 changed files with 107 additions and 65 deletions

View File

@ -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)