|
@@ -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 {
|