CollActionteam / collaction_backend

Backend code for CollAction
6 stars 4 forks source link

Feat/can 75/firebase jwt auth #3

Closed rubenhorn closed 3 years ago

rubenhorn commented 3 years ago

Sorry for the messy commit history. I guess I forgot to pull before creating the new branch. 🙈

zen37 commented 3 years ago

Perhaps it would be better to use instead of hasAuthJWT a more English readable name like hasAuthorization, but this is semantics :).

body, _ := json.Marshal(....

Getting also the error and handling it would be better.

body, err := json.Marshal(....

Very unlikely there will be an error so many examples I've seen do not use it, but I've also seen examples with err as well, and it would a good practice in our project to always get and handle an error, even if the likelihood of it happening is minimal.