화이트리스트 멤버에 tag 추가
This commit is contained in:
10
core/api.go
10
core/api.go
@ -326,7 +326,13 @@ func (caller apiCaller) whitelistAPI(w http.ResponseWriter, r *http.Request) err
|
||||
}
|
||||
|
||||
if len(all) > 0 {
|
||||
allraw, _ := json.Marshal(all)
|
||||
var notexp []primitive.M
|
||||
for _, v := range all {
|
||||
if _, exp := v["_ts"]; !exp {
|
||||
notexp = append(notexp, v)
|
||||
}
|
||||
}
|
||||
allraw, _ := json.Marshal(notexp)
|
||||
w.Write(allraw)
|
||||
}
|
||||
} else {
|
||||
@ -345,6 +351,8 @@ func (caller apiCaller) whitelistAPI(w http.ResponseWriter, r *http.Request) err
|
||||
}
|
||||
|
||||
member.Expired = 0
|
||||
// 테스트
|
||||
member.Tag = whitelistMemberTag_QA
|
||||
|
||||
_, _, err := mg.mongoClient.Update(CollectionWhitelist, bson.M{
|
||||
"_id": primitive.NewObjectID(),
|
||||
|
||||
Reference in New Issue
Block a user