SoftwareGuy / NodeListServer

Node List Server is a multi-purpose server list system. NodeJS powered and supports Docker.
Other
92 stars 33 forks source link

Merged Update with Add #9

Closed JesusLuvsYooh closed 3 years ago

JesusLuvsYooh commented 3 years ago

Tested, and seems to be working fine, feel free to give a once-over check just incase.

JesusLuvsYooh commented 3 years ago

Regarding issue: https://github.com/SoftwareGuy/NodeListServer/issues/6

Extra function in Unity currently needed, to do similar thing at the NLS side.
And this way, if the game list gets closed for whatever reason, games will auto add themselves next Coroutine/call.
At moment they cannot, as they cannot re-add (update) if add is not called first.

Changes done: Slashed this out, as we dont want people to call update anymore. //expressApp.post("/update", apiUpdateServerInList);

Removed the checks in the apiUpdateServerInList() function, as apiAddToServerList() does that.

Then in the uuid collision check, in apiAddToServerList(); call apiUpdateServerInList() if there is a collision, else continue to add.

JesusLuvsYooh commented 3 years ago

@SoftwareGuy

SoftwareGuy commented 3 years ago

I'll fix up this low-hanging left over that Codacy reported. Other than that I'll give it a stress test and go from there.