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)