🐝 reformat code

This commit is contained in:
微凉
2021-03-05 21:25:44 +08:00
parent d137ef8759
commit 3138e031f5
28 changed files with 389 additions and 389 deletions

View File

@ -23,8 +23,8 @@ func Get(c *gin.Context) {
return
}
log.Debugf("list:%+v", get)
path,name:=filepath.Split(get.File)
file, err := models.GetFileByParentPathAndName(path,name)
dir, name := filepath.Split(get.File)
file, err := models.GetFileByParentPathAndName(dir, name)
if err != nil {
c.JSON(200, controllers.MetaResponse(500, err.Error()))
return
@ -36,8 +36,8 @@ func Get(c *gin.Context) {
func Down(c *gin.Context) {
filePath := c.Param("file")
log.Debugf("down:%s", filePath)
path,name:=filepath.Split(filePath)
fileModel, err := models.GetFileByParentPathAndName(path,name)
dir, name := filepath.Split(filePath)
fileModel, err := models.GetFileByParentPathAndName(dir, name)
if err != nil {
c.JSON(200, controllers.MetaResponse(500, err.Error()))
return