🐝 reformat code
This commit is contained in:
@@ -23,8 +23,8 @@ func Get(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debugf("list:%+v", get)
|
log.Debugf("list:%+v", get)
|
||||||
path,name:=filepath.Split(get.File)
|
dir, name := filepath.Split(get.File)
|
||||||
file, err := models.GetFileByParentPathAndName(path,name)
|
file, err := models.GetFileByParentPathAndName(dir, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(200, controllers.MetaResponse(500, err.Error()))
|
c.JSON(200, controllers.MetaResponse(500, err.Error()))
|
||||||
return
|
return
|
||||||
@@ -36,8 +36,8 @@ func Get(c *gin.Context) {
|
|||||||
func Down(c *gin.Context) {
|
func Down(c *gin.Context) {
|
||||||
filePath := c.Param("file")
|
filePath := c.Param("file")
|
||||||
log.Debugf("down:%s", filePath)
|
log.Debugf("down:%s", filePath)
|
||||||
path,name:=filepath.Split(filePath)
|
dir, name := filepath.Split(filePath)
|
||||||
fileModel, err := models.GetFileByParentPathAndName(path,name)
|
fileModel, err := models.GetFileByParentPathAndName(dir, name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(200, controllers.MetaResponse(500, err.Error()))
|
c.JSON(200, controllers.MetaResponse(500, err.Error()))
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user