Add recursive deletion for S3 objects to enable folder deletion
This commit is contained in:
@ -36,21 +36,21 @@ func PATCH(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
err = app.Server.Service.RemoveFileCache(r.Context(), fileID)
|
||||
err = app.Server.Cache.RemoveFileCache(r.Context(), fileID)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
app.Server.Logger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
err = app.Server.Service.RemoveUserFilesCache(r.Context(), userSession.UserID)
|
||||
err = app.Server.Cache.RemoveUserFilesCache(r.Context(), userSession.UserID)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
app.Server.Logger.Error(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
userFile, err := app.Server.Service.GetFileDetail(r.Context(), newFile.ID)
|
||||
userFile, err := app.Server.Cache.GetFileDetail(r.Context(), newFile.ID)
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
app.Server.Logger.Error(err.Error())
|
||||
|
Reference in New Issue
Block a user