digitalinteraction / deconf-api-toolkit

A library for running decentralised virtual conferences
https://deconf-api.openlab.dev/
MIT License
2 stars 0 forks source link

Improve RegistrationRepo #19

Open robb-j opened 2 years ago

robb-j commented 2 years ago

The queries have become unoptimised for it's use in RegistrationRoutes

From #13

robb-j commented 2 years ago

getVerifiedRegistration doesn’t really make sense as a method because it now takes an id rather than an email. It originally took an email but that changed when JWTs were changed to store the id in them instead. It could now just be “getVerification” and the caller can null test and check .verified. This opens up the other method for retrieving to take an email and return a list, e.g. getRegAttempts(): Reg[].