🎇 finish move api

This commit is contained in:
微凉
2022-01-20 19:58:25 +08:00
parent de638c7c36
commit 9516ac6718
4 changed files with 12 additions and 3 deletions

View File

@ -16,9 +16,9 @@ func Folder(c *gin.Context) {
common.ErrorResp(c, err, 400)
return
}
var files []model.File
var files = make([]model.File, 0)
var err error
if model.AccountsCount() > 1 && req.Path == "/" {
if model.AccountsCount() > 1 && (req.Path == "/" || req.Path == "") {
files, err = model.GetAccountFiles()
if err != nil {
common.ErrorResp(c, err, 500)