From 231b1a35d58e8a00bf8d49777e8ecb6673fced66 Mon Sep 17 00:00:00 2001 From: mklee Date: Thu, 22 Feb 2024 17:07:16 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"[=EC=9D=B4=EB=AF=BC=EC=9A=B0]=20?= =?UTF-8?q?=EC=9A=B4=EC=98=81=ED=88=B4=20=EA=B0=9C=EC=84=A0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 424c8be42031b59d237876d58c3a2820d31fecd4. --- core/api_coupon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/api_coupon.go b/core/api_coupon.go index f475a02..74fd4dd 100644 --- a/core/api_coupon.go +++ b/core/api_coupon.go @@ -261,8 +261,8 @@ func listAllCouponNames(mongoClient gocommon.MongoClient, w http.ResponseWriter, } func useCoupon(mongoClient gocommon.MongoClient, w http.ResponseWriter, r *http.Request) { - acc, _ := gocommon.ReadStringFormValue(r.Form, "accid") - if len(acc) == 0 { + acc, ok := gocommon.ReadObjectIDFormValue(r.Form, "accid") + if !ok || acc.IsZero() { w.WriteHeader(http.StatusBadRequest) return }