This commit is contained in:
Daniel 2024-07-06 09:51:54 +08:00
parent 644257998c
commit 427293f3e6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 6 additions and 4 deletions

View file

@ -159,13 +159,16 @@ func renameAsset(c *gin.Context) {
oldPath := arg["oldPath"].(string)
newName := arg["newName"].(string)
err := model.RenameAsset(oldPath, newName)
newPath, err := model.RenameAsset(oldPath, newName)
if nil != err {
ret.Code = -1
ret.Msg = err.Error()
ret.Data = map[string]interface{}{"closeTimeout": 5000}
return
}
ret.Data = map[string]interface{}{
"newPath": newPath,
}
}
func getDocImageAssets(c *gin.Context) {