f
This commit is contained in:
@@ -26,6 +26,8 @@ import (
|
||||
pay "tyc-server/app/main/api/internal/handler/pay"
|
||||
product "tyc-server/app/main/api/internal/handler/product"
|
||||
query "tyc-server/app/main/api/internal/handler/query"
|
||||
tianyuan "tyc-server/app/main/api/internal/handler/tianyuan"
|
||||
upload "tyc-server/app/main/api/internal/handler/upload"
|
||||
user "tyc-server/app/main/api/internal/handler/user"
|
||||
"tyc-server/app/main/api/internal/svc"
|
||||
|
||||
@@ -770,7 +772,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
@@ -810,7 +812,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
@@ -830,7 +832,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
@@ -880,7 +882,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor, serverCtx.UserDisableInterceptor},
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
@@ -987,7 +989,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
Method: http.MethodPost,
|
||||
@@ -1039,7 +1041,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor, serverCtx.UserDisableInterceptor},
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// query service agent
|
||||
@@ -1059,7 +1061,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// query service
|
||||
@@ -1075,7 +1077,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.UserDisableInterceptor, serverCtx.UserAuthInterceptor},
|
||||
[]rest.Middleware{serverCtx.UserAuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 生成分享链接
|
||||
@@ -1148,6 +1150,36 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
rest.WithPrefix("/api/v1"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// 天远车辆类接口异步回调
|
||||
Method: http.MethodPost,
|
||||
Path: "/tianyuan/vehicle/callback",
|
||||
Handler: tianyuan.VehicleCallbackHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/api/v1"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// 访问已上传文件(供第三方或前端通过返回的 URL 拉取)
|
||||
Method: http.MethodGet,
|
||||
Path: "/upload/file/:fileName",
|
||||
Handler: upload.ServeUploadedFileHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
// 上传图片,返回可访问 URL(如行驶证);限制 3MB
|
||||
Method: http.MethodPost,
|
||||
Path: "/upload/image",
|
||||
Handler: upload.UploadImageHandler(serverCtx),
|
||||
},
|
||||
},
|
||||
rest.WithPrefix("/api/v1"),
|
||||
)
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
@@ -1179,7 +1211,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
rest.WithMiddlewares(
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor, serverCtx.UserDisableInterceptor},
|
||||
[]rest.Middleware{serverCtx.AuthInterceptor},
|
||||
[]rest.Route{
|
||||
{
|
||||
// 绑定手机号
|
||||
|
||||
Reference in New Issue
Block a user