계정 제재 동작 오류 수정
This commit is contained in:
@ -340,10 +340,10 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeUniqueIndices(CollectionBlock, map[string]bson.D{
|
||||
"codeaccid": {{Key: "code", Value: 1}, {Key: "accid", Value: 1}},
|
||||
}); err != nil {
|
||||
return err
|
||||
if *devflag {
|
||||
if err = mg.mongoClient.DropIndex(CollectionBlock, "codeaccid"); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if err = mg.mongoClient.MakeExpireIndex(CollectionBlock, int32(3)); err != nil {
|
||||
@ -417,7 +417,7 @@ func (mg *Maingate) prepare(context context.Context) (err error) {
|
||||
mg.wl.init(whites)
|
||||
|
||||
var blocks []*blockinfo
|
||||
if err := mg.mongoClient.AllAs(CollectionBlock, &blocks, options.Find().SetReturnKey(false)); err != nil {
|
||||
if err := mg.mongoClient.AllAs(CollectionBlock, &blocks); err != nil {
|
||||
return err
|
||||
}
|
||||
mg.bl.init(blocks)
|
||||
|
||||
Reference in New Issue
Block a user