feat: clear cache after change
This commit is contained in:
@ -31,6 +31,8 @@ func moveFiles(ctx context.Context, src, dst string, overwrite bool) (status int
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
fs.ClearCache(path.Dir(src))
|
||||
fs.ClearCache(path.Dir(dst))
|
||||
// TODO if there are no files copy, should return 204
|
||||
return http.StatusCreated, nil
|
||||
}
|
||||
@ -43,6 +45,7 @@ func copyFiles(ctx context.Context, src, dst string, overwrite bool) (status int
|
||||
if err != nil {
|
||||
return http.StatusInternalServerError, err
|
||||
}
|
||||
fs.ClearCache(path.Dir(dst))
|
||||
// TODO if there are no files copy, should return 204
|
||||
return http.StatusCreated, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user