화이트리스트 추가 안되는 문제 수정
This commit is contained in:
@ -233,7 +233,7 @@ func (caller apiCaller) whitelistAPI(w http.ResponseWriter, r *http.Request) err
|
||||
return err
|
||||
}
|
||||
member.ExpiredAt = 0
|
||||
|
||||
member.Id = primitive.NilObjectID
|
||||
_, _, err := mg.mongoClient.Update(CollectionWhitelist, bson.M{
|
||||
"_id": primitive.NewObjectID(),
|
||||
}, bson.M{
|
||||
|
||||
@ -350,11 +350,6 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
return makeErrorWithStack(err)
|
||||
}
|
||||
|
||||
if *devflag {
|
||||
// 에러 체크하지 말것
|
||||
mg.mongoClient.DropIndex(CollectionBlock, "codeaccid")
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeExpireIndex(CollectionBlock, int32(3)); err != nil {
|
||||
return makeErrorWithStack(err)
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ type blockinfoWithStringId struct {
|
||||
}
|
||||
|
||||
type whitelistmember struct {
|
||||
Id primitive.ObjectID `bson:"_id" json:"_id"`
|
||||
Id primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
|
||||
Email string `bson:"email" json:"email"`
|
||||
Platform string `bson:"platform" json:"platform"`
|
||||
Desc string `bson:"desc" json:"desc"`
|
||||
|
||||
Reference in New Issue
Block a user