[이민권] 계정 삭제
- 계정 삭제 취소 기능 추가
This commit is contained in:
@ -687,16 +687,6 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
if link["_ts"] != nil {
|
||||
delts := link["_ts"].(primitive.DateTime)
|
||||
if !delts.Time().IsZero() {
|
||||
// 삭제된 계정. 삭제 되었다고 알려주자
|
||||
w.Header().Add("MG-ACCOUNT-DELETED", "TRUE")
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
linkid := link["_id"].(primitive.ObjectID)
|
||||
newaccid := primitive.NewObjectID()
|
||||
for i := 0; i < len(sh.serviceCodeBytes); i++ {
|
||||
@ -761,6 +751,14 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
|
||||
if *noauth {
|
||||
output["noauth"] = true
|
||||
}
|
||||
|
||||
if link["_ts"] != nil {
|
||||
delts := link["_ts"].(primitive.DateTime)
|
||||
if !delts.Time().IsZero() {
|
||||
// 삭제된 계정. 삭제 되었다고 알려주자
|
||||
w.Header().Add("MG-ACCOUNT-DELETED", "TRUE")
|
||||
}
|
||||
}
|
||||
bt, _ := json.Marshal(output)
|
||||
w.Write(bt)
|
||||
} else if len(session) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user