Skip to content

Commit

Permalink
bugfix liked
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbbbbbbbbbbba committed Jan 17, 2024
1 parent 5d66b63 commit 08ee80e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/internal/controllers/api/like_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *LikeController) GetLiked() *web.JsonResult {
entityId = params.FormValueInt64Default(c.Ctx, "entityId", 0)
)
if user == nil || strs.IsBlank(entityType) || entityId <= 0 {
return web.NewEmptyRspBuilder().Put("liked", false).JsonResult()
return web.JsonData(false)
} else {
liked := services.UserLikeService.Exists(user.Id, entityType, entityId)
return web.JsonData(liked)
Expand Down

0 comments on commit 08ee80e

Please sign in to comment.