UCLA-Creative-Labs / aurgy-backend

the logic behind generating out-of-body music playlists
MIT License
3 stars 0 forks source link

feat: user class #15

Closed BryanPan342 closed 2 years ago

BryanPan342 commented 2 years ago

Features

Created a User class and extended the functionality of DbClient and DbItem to make writing/reading from database easy.

DbClient

DbItem

User Complete class with fromId and verifyRequest.

fromId - Checks to see if a user exists in the database and if so, it returns a user object.

const user = await User.fromId(id);

verifyRequest - Verify the user exists in the database and that the refresh token match

const {status, user} = await User.verifyRequest(id, refreshToken);

Linter Changes

Breaking Changes

Moved config dir to /opt/oracle/instantclient because we switched over the instance and ubuntu needs access to the file through sudo.

Fixes #8

mergify[bot] commented 2 years ago

Thanks for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).