계정 제재 개선
This commit is contained in:
@ -22,17 +22,10 @@ import (
|
||||
)
|
||||
|
||||
type blockinfo struct {
|
||||
Start primitive.DateTime `bson:"start" json:"start"`
|
||||
End primitive.DateTime `bson:"_ts" json:"_ts"`
|
||||
Reason string `bson:"reason" json:"reason"`
|
||||
Accid primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
|
||||
}
|
||||
|
||||
type blockinfoWithStringId struct {
|
||||
Reason string `bson:"reason" json:"reason"`
|
||||
StrId string `bson:"id" json:"id"`
|
||||
StartUnix int64 `bson:"start_unix" json:"start_unix"`
|
||||
EndUnix int64 `bson:"end_unix" json:"end_unix"`
|
||||
Start primitive.DateTime `bson:"start" json:"start"`
|
||||
End primitive.DateTime `bson:"_ts" json:"_ts"`
|
||||
Accid primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"`
|
||||
Meta primitive.M `bson:"meta,omitempty" json:"meta,omitempty"`
|
||||
}
|
||||
|
||||
type whitelistmember struct {
|
||||
@ -663,7 +656,6 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
|
||||
// 블럭된 계정. 블락 정보를 알려준다.
|
||||
w.Header().Add("MG-ACCOUNTBLOCK-START", strconv.FormatInt(bi.Start.Time().Unix(), 10))
|
||||
w.Header().Add("MG-ACCOUNTBLOCK-END", strconv.FormatInt(bi.End.Time().Unix(), 10))
|
||||
w.Header().Add("MG-ACCOUNTBLOCK-REASON", bi.Reason)
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user