Feat: thumb for shared folder

This commit is contained in:
HFO4
2020-02-01 10:34:23 +08:00
parent 9fe451ad4b
commit 437bdf46d4
4 changed files with 81 additions and 0 deletions

View File

@@ -160,3 +160,16 @@ func ArchiveShare(c *gin.Context) {
c.JSON(200, ErrorResponse(err))
}
}
// ShareThumb 获取分享目录下文件的缩略图
func ShareThumb(c *gin.Context) {
var service share.Service
if err := c.ShouldBindQuery(&service); err == nil {
res := service.Thumb(c)
if res.Code >= 0 {
c.JSON(200, res)
}
} else {
c.JSON(200, ErrorResponse(err))
}
}