perf(alias): disabled log on fs call (close #4054)
This commit is contained in:
@ -79,14 +79,14 @@ func FsList(c *gin.Context) {
|
||||
common.ErrorStrResp(c, "Refresh without permission", 403)
|
||||
return
|
||||
}
|
||||
objs, err := fs.List(c, reqPath, req.Refresh)
|
||||
objs, err := fs.List(c, reqPath, &fs.ListArgs{Refresh: req.Refresh})
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
}
|
||||
total, objs := pagination(objs, &req.PageReq)
|
||||
provider := "unknown"
|
||||
storage, err := fs.GetStorage(reqPath)
|
||||
storage, err := fs.GetStorage(reqPath, &fs.GetStoragesArgs{})
|
||||
if err == nil {
|
||||
provider = storage.GetStorage().Driver
|
||||
}
|
||||
@ -132,7 +132,7 @@ func FsDirs(c *gin.Context) {
|
||||
common.ErrorStrResp(c, "password is incorrect or you have no permission", 403)
|
||||
return
|
||||
}
|
||||
objs, err := fs.List(c, reqPath)
|
||||
objs, err := fs.List(c, reqPath, &fs.ListArgs{})
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
@ -247,14 +247,14 @@ func FsGet(c *gin.Context) {
|
||||
common.ErrorStrResp(c, "password is incorrect or you have no permission", 403)
|
||||
return
|
||||
}
|
||||
obj, err := fs.Get(c, reqPath)
|
||||
obj, err := fs.Get(c, reqPath, &fs.GetArgs{})
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
}
|
||||
var rawURL string
|
||||
|
||||
storage, err := fs.GetStorage(reqPath)
|
||||
storage, err := fs.GetStorage(reqPath, &fs.GetStoragesArgs{})
|
||||
provider := "unknown"
|
||||
if err == nil {
|
||||
provider = storage.Config().Name
|
||||
@ -297,7 +297,7 @@ func FsGet(c *gin.Context) {
|
||||
}
|
||||
var related []model.Obj
|
||||
parentPath := stdpath.Dir(reqPath)
|
||||
sameLevelFiles, err := fs.List(c, parentPath)
|
||||
sameLevelFiles, err := fs.List(c, parentPath, &fs.ListArgs{})
|
||||
if err == nil {
|
||||
related = filterRelated(sameLevelFiles, obj)
|
||||
}
|
||||
|
Reference in New Issue
Block a user