Modify: clean modals

This commit is contained in:
HFO4
2020-03-11 15:22:21 +08:00
parent 4d70f9fa3e
commit 4ba24e0cf1
30 changed files with 22 additions and 598 deletions

View File

@@ -117,8 +117,6 @@ func (service *ShareListService) List(c *gin.Context, user *model.User) serializ
func (service *ShareGetService) Get(c *gin.Context) serializer.Response {
shareCtx, _ := c.Get("share")
share := shareCtx.(*model.Share)
userCtx, _ := c.Get("user")
user := userCtx.(*model.User)
// 是否已解锁
unlocked := true
@@ -138,11 +136,6 @@ func (service *ShareGetService) Get(c *gin.Context) serializer.Response {
share.Viewed()
}
// 如果已经下载过或者是自己的分享,不需要付积分
if share.UserID == user.ID || share.WasDownloadedBy(user, c) {
share.Score = 0
}
return serializer.Response{
Code: 0,
Data: serializer.BuildShareResponse(share, unlocked),