Skip to content

Commit

Permalink
Merge pull request #7 from AAStarCommunity/chao/chore-typo
Browse files Browse the repository at this point in the history
chore: url pattern; typo: support
  • Loading branch information
fanhousanbu committed Mar 1, 2024
2 parents 4ab6975 + ff7fc86 commit 7ea0098
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion rpc_server/api/v1/get_support_entrypoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
5 changes: 2 additions & 3 deletions rpc_server/routers/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
}

0 comments on commit 7ea0098

Please sign in to comment.