🐝 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

@@ -11,14 +11,14 @@ import (
func OfficePreview(c *gin.Context) {
var req alidrive.OfficePreviewUrlReq
if err := c.ShouldBindJSON(&req); err != nil {
c.JSON(200, controllers.MetaResponse(400,"Bad Request"))
c.JSON(200, controllers.MetaResponse(400, "Bad Request"))
return
}
log.Debugf("preview_req:%+v",req)
preview,err:=alidrive.GetOfficePreviewUrl(req.FileId)
if err!=nil {
c.JSON(200, controllers.MetaResponse(500,err.Error()))
log.Debugf("preview_req:%+v", req)
preview, err := alidrive.GetOfficePreviewUrl(req.FileId)
if err != nil {
c.JSON(200, controllers.MetaResponse(500, err.Error()))
return
}
c.JSON(200, controllers.DataResponse(preview))
}
}