This branch adds the buildings endpoints to query building data. It removes the previous, temporary mock data of the buildings and adds methods to query DB for building info to send back to user.
Changes
Building-Related
Added **.env to .gitignore
Added migration.py and necessary dependencies to requirements.txt
Added methods to db.go to query all buildings and a single building by id
Updated endpoints to use methods from DB
Updated mock DB
Fixed type-related error for buildings-test.go
Added Building type
Misc.
Added various logging to /logout so we can look into the error
Removes related and redundant access_tokens and refresh_tokens for users that are logging in
In theory, this shouldn't happen as if they are logging in, they are either logged out (which removes cookies) or their cookies expired (don't exist anymore) so this is more of a precaution
Next steps
As for future steps, we should look into:
Structuring the Building information to be a bit cleaner. (i.e. removing add and change dates, grouping similar info like lat and long, etc.)
Perhaps looking into a cleaner way to Scan into a type? Previously have looked into Nullable fields and custom JSON unmarshalling but this method works well for the time being. (for proof of concept applications atm)
Adding actual and comprehensive testing (at the moment testing doesn't do much if anything)
Adding future endpoints or add support for query strings
Overview
This branch adds the buildings endpoints to query building data. It removes the previous, temporary mock data of the buildings and adds methods to query DB for building info to send back to user.
Changes
Building-Related
Misc.
Next steps
As for future steps, we should look into: