🎇 支持mysql
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
@ -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]构建目录树成功")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user