shobhit-pathak / MatchZy

MatchZy is a plugin for CS2 (Counter Strike 2) for running and managing practice/pugs/scrims/matches with easy configuration and Get5 (G5API/G5V) support as well!
https://shobhit-pathak.github.io/MatchZy/
MIT License
220 stars 55 forks source link

Make MatchID int ( #164 ) #173

Closed FlowingSPDG closed 1 week ago

FlowingSPDG commented 1 week ago

context: #164

Originally get5 matchid WAS int, and supported string afterwards.

Now MatchZy only supports integer, However its definitions is string so I fixed them :)

shobhit-pathak commented 1 week ago

Hey!

Thanks for the PR. A quick question, can G5API accept matchid as an integer or does it still needs to be a string?

FlowingSPDG commented 1 week ago

@shobhit-pathak Hi again! I think it already accepts both of int and string since its any type on TypeScript? https://github.com/PhlexPlexico/G5API/blob/20727f19ab9cf145257f777bf7e4954e14a1b7a7/src/routes/v2/api.ts#L88

Also matchID is defined as generic type for string | number so I believe it will be okay https://github.com/PhlexPlexico/G5API/blob/20727f19ab9cf145257f777bf7e4954e14a1b7a7/src/utility/utils.ts#L509-L516

shobhit-pathak commented 1 week ago

Thanks for the confirmation!

FlowingSPDG commented 1 week ago

Thank you for merging this! I think I forgot to change one thing here: https://github.com/shobhit-pathak/MatchZy/blob/a3a34e358eafed20c910dcc0b0fc7f5239ff1b34/DemoManagement.cs#L117

It's better to change it to long/integer imo but if you're worrying about back-compatibility I guess we can leave it string

Nevermind, it was header anyway lol