Skip to content

Commit

Permalink
Merge pull request #575 from rocboss/dev
Browse files Browse the repository at this point in the history
fixed nil user err in tweet detail logic
  • Loading branch information
alimy committed Sep 10, 2024
2 parents 4ad0260 + 77fa290 commit b28940b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/servants/web/loose.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (s *looseSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, m
// 检测访问权限
// TODO: 提到最前面去检测
switch {
case req.User.IsAdmin:
case req.User != nil && req.User.IsAdmin:
break
case post.Visibility == core.PostVisitPublic:
break
Expand Down

0 comments on commit b28940b

Please sign in to comment.