diff --git a/core/service.go b/core/service.go index 1d5699c..b125ac4 100644 --- a/core/service.go +++ b/core/service.go @@ -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 {