account index

This commit is contained in:
微凉
2021-11-03 10:37:33 +08:00
parent 04e89754f7
commit d78b64ee3c
5 changed files with 37 additions and 12 deletions

View File

@ -29,10 +29,14 @@ func Path(ctx *fiber.Ctx) error {
// TODO hide or ignore?
}
if model.AccountsCount() > 1 && req.Path == "/" {
files, err := model.GetAccountFiles()
if err != nil {
return ErrorResp(ctx, err, 500)
}
return ctx.JSON(Resp{
Code: 200,
Message: "folder",
Data: model.GetAccountFiles(),
Data: files,
})
}
account, path, driver, err := ParsePath(req.Path)