HackIllinois / api

The Official API supporting HackIllinois
https://api.hackillinois.org
Other
23 stars 51 forks source link

Find convenient way of casting decoded JWTs #536

Open Nydauron opened 1 year ago

Nydauron commented 1 year ago

As per #535, it introduced a new function utils.FetchIdFromSignedUserToken() which has some amount of duplicate code compared to say utils.ExtractFieldFromJWT(). The main differences include it casting to a string rather than a []string.

Question to ask is it worth the effort of reducing duplication for this small amount of code?