feat: support refreshing hash

This commit is contained in:
hexxa 2021-09-26 10:41:25 +08:00 committed by Hexxa
parent f8bb187c89
commit ec1bb36c21
11 changed files with 99 additions and 36 deletions

View file

@ -903,12 +903,12 @@ func (h *FileHandlers) ListSharings(c *gin.Context) {
c.JSON(200, &SharingResp{SharingDirs: dirs})
}
type HashBody struct {
type GenerateHashReq struct {
FilePath string `json:"filePath"`
}
func (h *FileHandlers) GenerateHash(c *gin.Context) {
req := &HashBody{}
req := &GenerateHashReq{}
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(q.ErrResp(c, 400, err))
return