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 Google Wallet Functions #25

Closed anandani4136 closed 1 year ago

anandani4136 commented 1 year ago

This endpoint adds a few points of functionality, such as • Google Wallet class generation for the R|P pass • User-specific pass generation, linked by email • Other ease-of-life helper functions

This takes in the email of the user and, after looking up the name of the user linked to the email, creates a custom R|P Google Wallet Event Pass for Reflections|Projections

Remaining tasks: Link QR-hash function result with the QR value

xuxey commented 1 year ago

Good to see this functionality in review! @anandani4136

Some broad improvements we can make:

anandani4136 commented 1 year ago

@xuxey @kajalpatelinfo @rohannunu

Barring the QR code's value being set to the hashed token (which will be completed imminently), please review this and let me know what can be improved on and any feedback. Thanks!

github-actions[bot] commented 1 year ago

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/opt/hostedtoolcache/node/16.20.1/x64/bin/npx' failed with exit code 1
St.:grey_question:
Category Percentage Covered / Total
🔴 Statements
43.79% (-26.26% 🔻)
229/523
🔴 Branches
6.82% (-0.68% 🔻)
3/44
🔴 Functions
23.19% (-6.32% 🔻)
16/69
🔴 Lines
41.85% (-25.22% 🔻)
195/466
Show new covered files 🐣
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------- | :--------- | :------- | :-------- | :----- | | 🔴 |
`...` / wallet.service.ts
| 36.36% | 0% | 20% | 32.26% | | 🔴 |
`...` / wallet.controller.ts
| 0% | 100% | 0% | 0% | | 🔴 |
`...` / wallet.module.ts
| 0% | 100% | 100% | 0% |
Show files with reduced coverage 🔻
|
St.:grey_question:
| File | Statements | Branches | Functions | Lines | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------- | :-------------------------------------------------------------- | :------- | :------------------------------------------------------------ | :-------------------------------------------------------------- | | 🔴 |
`...` / attendees.service.ts
|
63.16% (-3.51% 🔻)
| 50% |
33.33% (-4.17% 🔻)
|
58.82% (-3.68% 🔻)
| | 🟡 |
`...` / roles.service.ts
|
77.78% (-11.11% 🔻)
| 100% |
0% (-50% 🔻)
|
71.43% (-14.29% 🔻)
| | 🔴 | app.module.ts |
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / attendees.module.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 | auth/auth.module.ts |
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / events.controller.ts
|
0% (-68.97% 🔻)
| 0% |
0% (-14.29% 🔻)
|
0% (-66.67% 🔻)
| | 🔴 |
`...` / events.module.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / events.service.ts
|
0% (-37.93% 🔻)
| 0% |
0% (-11.11% 🔻)
|
0% (-33.33% 🔻)
| | 🔴 |
`...` / email.module.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / roles.module.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / create-event.dto.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / register-attendee.dto.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
| | 🔴 |
`...` / update-event.dto.ts
|
0% (-100% 🔻)
| 100% | 100% |
0% (-100% 🔻)
|

Test suite run failed

Failed tests: 0/11. Failed suites: 3/12.
``` ● Test suite failed to run Cannot find module 'src/auth/auth.guard' from 'wallet/wallet.controller.ts' Require stack: wallet/wallet.controller.ts wallet/wallet.module.ts app.module.ts events/events.controller.spec.ts 15 | import { Response, Request } from 'express'; 16 | import { JwtService } from '@nestjs/jwt'; > 17 | import { AuthGuard } from 'src/auth/auth.guard'; | ^ 18 | import { AttendeeService } from 'src/attendees/attendees.service'; 19 | 20 | @Controller('wallet') at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (wallet/wallet.controller.ts:17:1) at Object.require (wallet/wallet.module.ts:2:1) at Object.require (app.module.ts:9:1) at Object. (events/events.controller.spec.ts:12:1) ``` --- ``` ● Test suite failed to run Cannot find module 'src/auth/auth.guard' from 'wallet/wallet.controller.ts' Require stack: wallet/wallet.controller.ts wallet/wallet.module.ts app.module.ts events/events.service.spec.ts 15 | import { Response, Request } from 'express'; 16 | import { JwtService } from '@nestjs/jwt'; > 17 | import { AuthGuard } from 'src/auth/auth.guard'; | ^ 18 | import { AttendeeService } from 'src/attendees/attendees.service'; 19 | 20 | @Controller('wallet') at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (wallet/wallet.controller.ts:17:1) at Object.require (wallet/wallet.module.ts:2:1) at Object.require (app.module.ts:9:1) at Object. (events/events.service.spec.ts:4:1) ``` --- ``` ● Test suite failed to run Cannot find module 'src/auth/auth.guard' from 'wallet/wallet.controller.ts' Require stack: wallet/wallet.controller.ts wallet/wallet.controller.spec.ts 15 | import { Response, Request } from 'express'; 16 | import { JwtService } from '@nestjs/jwt'; > 17 | import { AuthGuard } from 'src/auth/auth.guard'; | ^ 18 | import { AttendeeService } from 'src/attendees/attendees.service'; 19 | 20 | @Controller('wallet') at Resolver._throwModNotFoundError (../node_modules/jest-resolve/build/resolver.js:427:11) at Object.require (wallet/wallet.controller.ts:17:1) at Object. (wallet/wallet.controller.spec.ts:2:1) ```

Report generated by 🧪jest coverage report action from d9cadd248152caff45f3f6bff4ee93fca979958a