Updata:增加文件名称检索
This commit is contained in:
parent
3e1ea5eb00
commit
6bfb8fa94c
@ -44,6 +44,7 @@ func List(ctx *gin.Context) {
|
|||||||
sortAsc, _ := strconv.ParseBool(ctx.DefaultQuery("sortAsc", "true"))
|
sortAsc, _ := strconv.ParseBool(ctx.DefaultQuery("sortAsc", "true"))
|
||||||
page, _ := strconv.Atoi(ctx.DefaultQuery("page", "1"))
|
page, _ := strconv.Atoi(ctx.DefaultQuery("page", "1"))
|
||||||
pageSize, _ := strconv.Atoi(ctx.DefaultQuery("pageSize", "100000"))
|
pageSize, _ := strconv.Atoi(ctx.DefaultQuery("pageSize", "100000"))
|
||||||
|
fileName := ctx.DefaultQuery("fileName", "")
|
||||||
resp, err := service.FilesProvider.List(ctx, &files.FileListReq{
|
resp, err := service.FilesProvider.List(ctx, &files.FileListReq{
|
||||||
Path: path,
|
Path: path,
|
||||||
UserSpacePath: getUserSpacePath(ctx),
|
UserSpacePath: getUserSpacePath(ctx),
|
||||||
@ -53,6 +54,7 @@ func List(ctx *gin.Context) {
|
|||||||
},
|
},
|
||||||
Page: int32(page),
|
Page: int32(page),
|
||||||
PageSize: int32(pageSize),
|
PageSize: int32(pageSize),
|
||||||
|
FileName: fileName,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
service.Error(ctx, errors.New(common.FileListFailed))
|
service.Error(ctx, errors.New(common.FileListFailed))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user