Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial setup: non default port is sent as string in json and therefore cannot be unmarshaled to struct in go #4

Closed
moehringn opened this issue Feb 17, 2023 · 2 comments · Fixed by #5
Assignees

Comments

@moehringn
Copy link

Using another postgres port sends the frontend json field port as a string which leads to an unmarshal error.

Error: json: cannot unmarshal string into Go struct field ConnConfig.port of type uint16

Call to http://localhost:3003/api/v1/connection

{
    "host": "localhost",
    "port": "5442",
    "database": "postgres",
    "user": "postgres",
    "password": "postgres"
}

Leaving the default value, the correct json is submitted:

{
    "host": "",
    "port": 5432,
    "database": "postgres",
    "user": "postgres",
    "password": "postgres"
}
@ciminelli
Copy link
Member

Thanks for the report, @moehringn! I just pushed a fix and the new image is available on Docker hub if you can rebuild and try again.

@moehringn
Copy link
Author

@ciminelli thx, working now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants