mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Modify: clean modals
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user