diff --git a/README.md b/README.md index ae75c6a4..6b1b95a4 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,10 @@ swag init -g ./cmd/server/main.go ``` > FAQ: [Unknown LeftDelim and RightDelim in swag.Spec](https://github.com/swaggo/swag/issues/1568) + +## 2. Run + +```shell +go mod tidy +go run ./cmd/server/main.go +``` diff --git a/rpc_server/api/v1/get_support_entrypoint.go b/rpc_server/api/v1/get_support_entrypoint.go index ff492e81..705a1216 100644 --- a/rpc_server/api/v1/get_support_entrypoint.go +++ b/rpc_server/api/v1/get_support_entrypoint.go @@ -13,7 +13,7 @@ import ( // @Description get the support entrypoint // @Accept json // @Product json -// @Router /api/v1/get_support_entrypoint [get] +// @Router /api/v1/get-support-entrypoint [get] // @Success 200 {object} gin.H func GetSupportEntrypoint(c *gin.Context) { //1.TODO API validate diff --git a/rpc_server/api/v1/get_supprot_strategy.go b/rpc_server/api/v1/get_support_strategy.go similarity index 93% rename from rpc_server/api/v1/get_supprot_strategy.go rename to rpc_server/api/v1/get_support_strategy.go index 0ad889e7..7d4f5cbe 100644 --- a/rpc_server/api/v1/get_supprot_strategy.go +++ b/rpc_server/api/v1/get_support_strategy.go @@ -14,7 +14,7 @@ import ( // @Accept json // @Produce json // @Success 200 {object} gin.H -// @Router /api/v1/get_support_strategy [get] +// @Router /api/v1/get-support-strategy [get] func GetSupportStrategy(c *gin.Context) { //1.TODO API validate //2. recall service diff --git a/rpc_server/api/v1/pay_user_operation.go b/rpc_server/api/v1/try_pay_user_operation.go similarity index 100% rename from rpc_server/api/v1/pay_user_operation.go rename to rpc_server/api/v1/try_pay_user_operation.go diff --git a/rpc_server/routers/routers.go b/rpc_server/routers/routers.go index 0db74d29..47e735d0 100644 --- a/rpc_server/routers/routers.go +++ b/rpc_server/routers/routers.go @@ -8,7 +8,6 @@ func init() { RouterMaps = make([]RouterMap, 0) RouterMaps = append(RouterMaps, RouterMap{"api/v1/try-pay-user-operation", []RestfulMethod{POST}, v1.TryPayUserOperation}) - RouterMaps = append(RouterMaps, RouterMap{"api/v1/get_support_strategy", []RestfulMethod{POST}, v1.GetSupportStrategy}) - RouterMaps = append(RouterMaps, RouterMap{"api/v1/get_support_entrypoint", []RestfulMethod{POST}, v1.GetSupportEntrypoint}) - + RouterMaps = append(RouterMaps, RouterMap{"api/v1/get-support-strategy", []RestfulMethod{POST}, v1.GetSupportStrategy}) + RouterMaps = append(RouterMaps, RouterMap{"api/v1/get-support-entrypoint", []RestfulMethod{POST}, v1.GetSupportEntrypoint}) }