🎇 支持mysql

This commit is contained in:
微凉
2021-03-16 23:15:37 +08:00
parent 4d0d892ce7
commit a5b2f998ab
15 changed files with 85 additions and 89 deletions

View File

@ -45,7 +45,7 @@ func Down(c *gin.Context) {
c.JSON(200, MetaResponse(406, "无法下载目录."))
return
}
drive := utils.GetDriveByName(strings.Split(dir,"/")[0])
drive := utils.GetDriveByName(strings.Split(dir, "/")[0])
if drive == nil {
c.JSON(200, MetaResponse(500, "找不到drive."))
return

View File

@ -42,7 +42,7 @@ func Get(c *gin.Context) {
}
return
}
drive := utils.GetDriveByName(strings.Split(dir,"/")[0])
drive := utils.GetDriveByName(strings.Split(dir, "/")[0])
if drive == nil {
c.JSON(200, MetaResponse(500, "找不到drive."))
return

View File

@ -44,6 +44,11 @@ func Path(c *gin.Context) {
}
// file
if file.Type == "file" {
if file.Password == "" {
file.Password = "n"
} else {
file.Password = "y"
}
c.JSON(200, DataResponse(file))
return
}
@ -57,7 +62,7 @@ func Path(c *gin.Context) {
for i, _ := range *files {
if (*files)[i].Password == "" {
(*files)[i].Password = "n"
}else {
} else {
(*files)[i].Password = "y"
}
}

View File

@ -13,7 +13,7 @@ func BuildTreeAll() {
for i, _ := range conf.Conf.AliDrive.Drives {
if err := BuildTree(&conf.Conf.AliDrive.Drives[i]); err != nil {
log.Errorf("盘[%s]构建目录树失败:%s", err.Error())
}else {
} else {
log.Infof("盘[%s]构建目录树成功")
}
}