From 1ba32aa4c92ad7f0ddb47189d11bef4d5f132a18 Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 29 Aug 2023 11:06:14 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BF=A0=ED=8F=B0=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/api_coupon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/api_coupon.go b/core/api_coupon.go index 9a7e396..8e788f6 100644 --- a/core/api_coupon.go +++ b/core/api_coupon.go @@ -231,7 +231,7 @@ func queryCoupon(mongoClient gocommon.MongoClient, w http.ResponseWriter, r *htt var coupon couponDoc if err := mongoClient.FindOneAs(CollectionCoupon, bson.M{ "_id": roundObj, - }, &coupon, options.FindOne().SetProjection(bson.M{"_id": 0, "effect": 1, "name": 1, "reason": 1, "total": 1, "remains": 0, "used": 0})); err != nil { + }, &coupon, options.FindOne().SetProjection(bson.M{"effect": 1, "name": 1, "reason": 1, "total": 1, "desc": 1}).SetReturnKey(false)); err != nil { logger.Println("[queryCoupon] FindOneAs failed :", err) w.WriteHeader(http.StatusInternalServerError) return