ReflectionsProjections / rp-api-2023

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

Add endpoints for QRP with unit tests #36

Closed xuxey closed 1 year ago

xuxey commented 1 year ago

Adds the following endpoints

PUT /events/:eventId/attendance/qr

Pass the string extracted from the QR code in the request body based on the DTO:

export class RegisterAttendeeQRDto {
  @IsString()
  token: string;
}

PUT /events/:eventId/attendance/email

Pass the email from the QRP manual input in the request body based on the DTO:

export class RegisterAttendeeEmailDto {
  @IsEmail()
  email: string;
}

Also added unit tests to verify various exceptions & behavior.

github-actions[bot] commented 1 year ago

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
66.67% (+1.19% πŸ”Ό)
430/645
πŸ”΄ Branches
19.44% (+4.06% πŸ”Ό)
14/72
πŸ”΄ Functions
29.89% (+1.65% πŸ”Ό)
26/87
🟑 Lines
64.37% (+1.46% πŸ”Ό)
374/581

Test suite run success

21 tests passing in 12 suites.

Report generated by πŸ§ͺjest coverage report action from 720a94b7bd71e3b11c9f050b68ec63a8ea16f52c