Permalink
Browse files

Return empty list when there's no coupons

  • Loading branch information...
biilmann committed Oct 12, 2017
1 parent d422225 commit d0a182eab8bba48a694fb79275f111f073dcfe4d
Showing with 1 addition and 1 deletion.
  1. +1 −1 api/coupons.go
View
@@ -51,7 +51,7 @@ func (a *API) CouponList(w http.ResponseWriter, r *http.Request) error {
couponCache := gcontext.GetCoupons(ctx)
if couponCache == nil {
return notFoundError("No coupons available")
return sendJSON(w, http.StatusOK, []string{})
}
coupons, err := couponCache.List()

0 comments on commit d0a182e

Please sign in to comment.