HuskieRobotics / SPOT

Apache License 2.0
24 stars 21 forks source link

remove server-side HTTP GET requests #90

Open gcschmit opened 9 months ago

gcschmit commented 9 months ago

There a few points in the server-side code that get data from the sever by specifying an endpoint. For example:

let manualSchedule = await axios.get(`http://localhost:${process.env.PORT || 8080}/schedule/matches`).then(res=>res.data) // temp fix

This should be replace with a simple function invocation. If the endpoint needs to be available to clients, decompose the behavior into a function that can also be invoked from the router.

Allybe commented 8 months ago

I think this would greatly benefit SPOT, really would help organize the code base! This should probably done with the use of a "main manager" maybe? A manager that holds other managers inside it so that the code is nice and neat, would require a ton of rewriting of existing code though.