mirror of https://gitee.com/answerdev/answer.git
fix userinfo
This commit is contained in:
parent
d8902a44d1
commit
287266d221
|
@ -165,6 +165,15 @@ func (tc *TemplateController) UserInfo(ctx *gin.Context) {
|
|||
req := &schema.GetOtherUserInfoByUsernameReq{}
|
||||
req.Username = username
|
||||
userinfo, err := tc.templateRenderController.UserInfo(ctx, req)
|
||||
if !userinfo.Has {
|
||||
ctx.HTML(http.StatusNotFound, "404.html", gin.H{
|
||||
"siteinfo": tc.SiteInfo(ctx),
|
||||
"scriptPath": tc.scriptPath,
|
||||
"cssPath": tc.cssPath,
|
||||
"err": "",
|
||||
})
|
||||
return
|
||||
}
|
||||
if err != nil {
|
||||
ctx.HTML(http.StatusNotFound, "404.html", gin.H{
|
||||
"siteinfo": tc.SiteInfo(ctx),
|
||||
|
|
Loading…
Reference in New Issue