Skip to content

Commit

Permalink
chore: use int query param for age in http (#3053)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman authored Oct 9, 2024
1 parent af833e1 commit 30f9e4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/go/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ type ApiError struct {
}

type GetQueryParams struct {
Age ftl.Option[string] `json:"age"`
Age ftl.Option[int] `json:"age"`
}

type GetPathParams struct {
Name string `json:"name"`
}

type GetResponse struct {
Name string `json:"name"`
Age ftl.Option[string] `json:"age"`
Name string `json:"name"`
Age ftl.Option[int] `json:"age"`
}

// Example usage of path and query params
Expand Down
2 changes: 1 addition & 1 deletion frontend/console/e2e/ingress-http.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test('send get request with path and query params', async ({ page }) => {
const responseJson = JSON.parse(responseText?.trim() || '{}')

expect(responseJson).toEqual({
age: '10',
age: 10,
name: 'wicket',
})
})
Expand Down

0 comments on commit 30f9e4d

Please sign in to comment.