Skip to content

Commit

Permalink
Merge pull request #184 from withchao/main
Browse files Browse the repository at this point in the history
feat: adjust api call rpc
  • Loading branch information
withchao authored Dec 23, 2024
2 parents d7f7d58 + dbbb9b2 commit a704d85
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 49 deletions.
2 changes: 1 addition & 1 deletion a2r/api2rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Option[A, B any] struct {
RespAfter func(*B) error
}

func Call[A, B, C any](rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client C, c *gin.Context, opts ...*Option[A, B]) {
func Call[A, B, C any](c *gin.Context, rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client C, opts ...*Option[A, B]) {
req, err := ParseRequestNotCheck[A](c)
if err != nil {
apiresp.GinError(c, err)
Expand Down
46 changes: 0 additions & 46 deletions a2r/call_v2.go

This file was deleted.

2 changes: 0 additions & 2 deletions a2r/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ func respNilReplace[T any](data *T) error {
mw.ReplaceNil(data)
return nil
}

// ------------------------------------------------------------------------------------------------------------------

0 comments on commit a704d85

Please sign in to comment.