ReflectionsProjections / rp-api-2023

Core Backend API Layer for Reflections | Projections 2023, powered by Nest.js
MIT License
0 stars 0 forks source link

Added auth role guards to be used on routes #13

Closed aniketgargya closed 1 year ago

aniketgargya commented 1 year ago

Added a guard to be used for protected routes.

The database collection should be named roles and each document should take the following form:

{
  "_id": {
    "$oid": "649a380b3ccb62010eee8a49"
  },
  "email": "xxxxxxxx@illinois.edu",
  "role": "Admin"
}

Example usage of the guard is provided in the @Patch(':id') route.