From 017c3bef1a91d07bdcc7dee198caad05f8689186 Mon Sep 17 00:00:00 2001 From: "LinskRuis.32" Date: Sat, 13 Jun 2020 17:51:08 +0800 Subject: [PATCH] +bug --- webs/sys/controller/user.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webs/sys/controller/user.go b/webs/sys/controller/user.go index 5dd3c90..fca88f0 100644 --- a/webs/sys/controller/user.go +++ b/webs/sys/controller/user.go @@ -52,6 +52,10 @@ func (UserController) info(c *macaron.Context, ch cache.Cache, ctj gocloud.ContJ } } e = userService.FindXid(xid) + if e == nil { + c.PlainText(404, []byte("not found")) + return + } bts, err := json.Marshal(e) if err == nil { ch.Put(key, bts, 3600*5)