csgo-league-web icon indicating copy to clipboard operation
csgo-league-web copied to clipboard

Add server info to matches table

Open cameronshinn opened this issue 4 years ago • 3 comments

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.

cameronshinn avatar Aug 15 '20 04:08 cameronshinn