Эх сурвалжийг харах

Merge branch 'master' of http://124.70.149.18:10880/sunsheng/box-cost

animeic 2 жил өмнө
parent
commit
4a37cbfdd4
1 өөрчлөгдсөн 12 нэмэгдсэн , 0 устгасан
  1. 12 0
      boxcost/api/router.go

+ 12 - 0
boxcost/api/router.go

@@ -1,6 +1,7 @@
 package api
 
 import (
+	"box-cost/db/repo"
 	"fmt"
 
 	"github.com/gin-gonic/gin"
@@ -56,6 +57,17 @@ func RegRouters(svc *Service) {
 
 	// 成品采购管理
 	Product(boxcost)
+
+	boxcost.GET("/apk/version", func(c *gin.Context, apictx *ApiSession) (interface{}, error) {
+		out, err := repo.RepoPageSearch(apictx.CreateRepoCtx(), &repo.PageSearchOptions{
+			CollectName: "versions",
+			Page:        1,
+			Size:        10,
+			Sort:        repo.Map{"releaseDate": -1},
+		})
+		c.JSON(200, out.List)
+		return nil, err
+	})
 }
 
 func Logger() gin.HandlerFunc {