From 37fa060a8a396d16764d6d245f8724935fc8769a Mon Sep 17 00:00:00 2001 From: CareyWong Date: Wed, 12 Feb 2020 21:41:27 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E5=91=BD=E4=B8=AD=E7=BC=93?= =?UTF-8?q?=E5=AD=98=EF=BC=8C=E8=BF=94=E5=9B=9E=E7=8A=B6=E6=80=81=E7=A0=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 2928182..4a1414b 100644 --- a/main.go +++ b/main.go @@ -77,6 +77,7 @@ func main() { if 1 == *cache { _shortUrl, err := redisClient.Get(longUrl).Result() if err == nil && _shortUrl != "" { + res.Code = 1 res.ShortUrl = _shortUrl c.JSON(200, res) return