UoaWDCC / uasc-web

Project with the University of Auckland Snowsports Club Website & Booking System. Established in 2023.
https://uasc.co.nz
6 stars 2 forks source link

[BACKEND] Remove "membership" property from firestore #321

Closed bcho892 closed 6 months ago

bcho892 commented 6 months ago

Is your feature request related to a problem? Please describe. Currently we have two ways of identifying the user's membership, one through their JWT token (firestore claims), the other through a property called membership in the Users collection.

The one in the Users collection serves no purpose and should therefore be removed.

The first thing to do is remove the membership property from UserAdditionalInfo in server\src\data-layer\models\firebase.ts

It is recommended to use a search feature in your IDE to find usages of membership. Tests relating to membership should be deleted, as well as any calls to UserService in the controllers folder that use it. The mocks in User.mock.ts (server\src\test-config\mocks\User.mock.ts) will also need to be updated.   BEFORE MERGING