作者 yangfu

router

@@ -2,6 +2,7 @@ package routers @@ -2,6 +2,7 @@ package routers
2 2
3 import ( 3 import (
4 "github.com/astaxie/beego" 4 "github.com/astaxie/beego"
  5 + "github.com/prometheus/client_golang/prometheus/promhttp"
5 "gitlab.fjmaimaimai.com/mmm-go/ability/controllers/v1" 6 "gitlab.fjmaimaimai.com/mmm-go/ability/controllers/v1"
6 ) 7 )
7 8
@@ -21,7 +22,22 @@ func init() { @@ -21,7 +22,22 @@ func init() {
21 nsV1.Router("/auth/login",auth,"post:Login") 22 nsV1.Router("/auth/login",auth,"post:Login")
22 nsV1.Router("/auth/accessToken",auth,"post:AccessToken") 23 nsV1.Router("/auth/accessToken",auth,"post:AccessToken")
23 nsV1.Router("/auth/refreshToken",auth,"post:RefreshToken") 24 nsV1.Router("/auth/refreshToken",auth,"post:RefreshToken")
  25 + nsV1.Router("/auth/smsCode",auth,"post:SmsCode")
24 } 26 }
  27 +
  28 + /*image controller*/
  29 + {
  30 + upload :=&v1.UploadController{}
  31 + nsV1.Router("/upload/image",upload,"post:Image")
  32 + }
  33 +
  34 + {
  35 + version :=&v1.VersionController{}
  36 + nsV1.Router("/version/getLatestVersionInfo",version,"post:GetLatestVersionInfo")
  37 + }
  38 +
  39 + beego.SetStaticPath("/file/ab",beego.AppConfig.String("source_path"))
  40 + beego.Handler("/metrics", promhttp.Handler())
25 beego.AddNamespace(nsV1) 41 beego.AddNamespace(nsV1)
26 } 42 }
27 43