🐝 reformat code
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user