Resolve issue with file visibility not updating after caching user files

This commit is contained in:
2024-09-23 10:44:25 +07:00
parent 9452d48bbd
commit 1feeafe7de
7 changed files with 50 additions and 62 deletions

View File

@ -29,7 +29,14 @@ func PUT(w http.ResponseWriter, r *http.Request) {
return
}
userFile, err := app.Server.Service.GetUserFile(r.Context(), file.Name, file.OwnerID.String())
err = app.Server.Service.DeleteFileCache(r.Context(), fileID)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
app.Server.Logger.Error(err.Error())
return
}
userFile, err := app.Server.Service.GetUserFile(r.Context(), file.ID)
if err != nil {
w.WriteHeader(http.StatusInternalServerError)
app.Server.Logger.Error(err.Error())