diff --git a/core/api.go b/core/api.go index 7f3959d..e32e367 100644 --- a/core/api.go +++ b/core/api.go @@ -161,14 +161,7 @@ func (caller apiCaller) uploadAPI(w http.ResponseWriter, r *http.Request) error func (caller apiCaller) blockAPI(w http.ResponseWriter, r *http.Request) error { mg := caller.mg if r.Method == "GET" { - target, ok := gocommon.ReadObjectIDFormValue(r.Form, "accid") - if ok { - json.NewEncoder(w).Encode(mg.bl.all()) - } else if !target.IsZero() { - if blocked, ok := mg.bl.get(target); ok && blocked != nil { - json.NewEncoder(w).Encode(blocked) - } - } + json.NewEncoder(w).Encode(mg.bl.all()) } else if r.Method == "PUT" { body, _ := io.ReadAll(r.Body) diff --git a/core/api_coupon.go b/core/api_coupon.go index 46e690d..8bf12ef 100644 --- a/core/api_coupon.go +++ b/core/api_coupon.go @@ -327,7 +327,7 @@ func useCoupon(mongoClient gocommon.MongoClient, w http.ResponseWriter, r *http. } } - if coupon.Expire > time.Now().Unix() { + if coupon.Expire < time.Now().Unix() { // 쿠폰 만료시간 경과 w.WriteHeader(http.StatusInternalServerError) return