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

Add server info to matches table #58

Open
cameronshinn opened this issue Aug 15, 2020 · 3 comments
Open

Add server info to matches table #58

cameronshinn opened this issue Aug 15, 2020 · 3 comments

Comments

@cameronshinn
Copy link
Member

Is your feature request related to a problem? Please describe.
The bot cannot use the /match/end/{id} endpoint without saving match info in its own database, because the endpoint requires the IP in the body of the request.

Describe the solution you'd like
It would be better to only have to provide the match ID since the web panel owns the IP and port data originally. Moving the getServers() call into the generateMatch() function would allow us to get the IP and port in there, save it into the matches table, and then return it from the function. This way, the /match/end/{id} endpoint could read the IP and port out of the matches table using the ID.

Describe alternatives you've considered
It is definitely possible to store it in a new table in the bot, but since the matches are managed by the web panel and it already has a matches table I'd think it's safer and more intuitive to keep this info in there.

Additional context
Need to resolve how this is going to work so I can decide how we are going to implement the end command.

@B3none
Copy link
Member

B3none commented Aug 15, 2020

This solution looks good to me, i'll implement it when I get a minute spare.

@B3none
Copy link
Member

B3none commented Aug 16, 2020

This would most likely need doing on the server side once the matches row is added to the database.

@cameronshinn
Copy link
Member Author

@B3none not sure what you mean by that. The match server would need to give the web panel the IP after the new row is added into the matches table?

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

No branches or pull requests

2 participants