[이민우] 운영툴 개선

- 쿠폰 만료시간 안되는 이슈 수정
- 전체 유저 제재 목록을 볼 수 있도록 수정
This commit is contained in:
2024-01-22 11:37:07 +09:00
parent dbd0a7bf5f
commit 0c678947cd
2 changed files with 2 additions and 9 deletions

View File

@ -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)

View File

@ -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