ccoverstreet / Jablko

Smart Home Interface powered by Go.
MIT License
1 stars 0 forks source link

Make handlers more maintainable #122

Open ccoverstreet opened 2 years ago

ccoverstreet commented 2 years ago

Right now, all handlers receive a *http.Request. This means that there is a lot of repeated code for extracting the data for each handler. A better method would be to pass a []byte to each handler with the handler's Unmarshalling the JSON.