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

Creating setuphandler to allow in-game set up to be queried via API #274

Merged
merged 4 commits into from
Aug 25, 2024

Conversation

pwdel
Copy link
Member

@pwdel pwdel commented Aug 24, 2024

@pwdel pwdel added the enhancement New feature or request label Aug 24, 2024
@pwdel pwdel self-assigned this Aug 24, 2024
@pwdel pwdel linked an issue Aug 24, 2024 that may be closed by this pull request
@pwdel pwdel marked this pull request as draft August 24, 2024 18:39
@pwdel pwdel changed the title Updating draft handler. Creating setuphandler to allow in-game set up to be queried via API Aug 24, 2024
@pwdel pwdel marked this pull request as ready for review August 24, 2024 19:58
Copy link
Collaborator

@ajlacey ajlacey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

It would be useful to add in the error cases when testing GetSetupHandler, but this looks good!

backend/handlers/setup/setuphandler.go Show resolved Hide resolved
Comment on lines +24 to +26
MockConfigLoader: func() (*setup.EconomicConfig, error) {
return setup.LoadEconomicsConfig()
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the way you did this! Can we add an error case as well, where the config fails to load?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwdel pwdel merged commit e5a74d0 into main Aug 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build setuphandler API
2 participants