优化
This commit is contained in:
@@ -81,6 +81,7 @@ func (h *Version) List(c *gin.Context) {
|
||||
}
|
||||
httpx.Write(c, httpx.CodeSuccess, httpx.PageResult{List: items, Total: total, Page: req.Page, PageSize: req.PageSize}, "获取成功")
|
||||
}
|
||||
|
||||
func (h *Version) Export(c *gin.Context) {
|
||||
var req dto.ExportVersionRequest
|
||||
if err := c.ShouldBindJSON(&req); err != nil {
|
||||
@@ -122,7 +123,7 @@ func (h *Version) Download(c *gin.Context) {
|
||||
c.Header("Content-Type", "application/json")
|
||||
c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s", name))
|
||||
c.Header("Content-Length", strconv.Itoa(len(raw)))
|
||||
c.Data(http.StatusOK, "application/json; charset=utf-8", []byte(raw))
|
||||
c.Data(http.StatusOK, "application/json", []byte(raw))
|
||||
}
|
||||
func (h *Version) Import(c *gin.Context) {
|
||||
var req dto.ImportVersionRequest
|
||||
|
||||
Reference in New Issue
Block a user