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] Create endpoint for creating guest user #379

Closed bcho892 closed 4 months ago

bcho892 commented 5 months ago

Is your feature request related to a problem? Please describe.

The request body should have the UserAdditionalInfo keys with the stripe_id omitted. The endpoint should be created in server\src\service-layer\controllers\AdminController.ts.

You will have to make use of the UserDataService to create a new document.

Following this, you should return the uid of the user that was created. Note that the ResponseModels must extend CommonResponse so we have a defined data format in case of an error.

Tests MUST be written for this in routes.test.ts - use the command yarn firebase-test "jest routes" to test this.

BEFORE MERGING

bcho892 commented 4 months ago

we already have this actually with admin/users/create...