cosmicds / cds-api

API for accessing the CosmicDS database
GNU General Public License v3.0
0 stars 3 forks source link

Fix issue with parsing usernames as IDs #72

Closed Carifio24 closed 1 year ago

Carifio24 commented 1 year ago

This PR fixes an issue that is arising when our (now randomly-generated) usernames start with at least one digit. Since we're using parseInt to parse the identifier, these usernames will return an integer and thus be interpreted as IDs. This PR switches things to what I should've done originally, which is to use Number instead.

Additionally, this updates the size of the username in the student table SQL schema, which we updated to account for these randomly-generated names.