Skip to content

Commit

Permalink
More documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTurk247 committed Jun 13, 2024
1 parent 613cc30 commit f9dd48c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spezi-invitation-code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ const {FieldValue} = require("firebase-admin/firestore");

/**
* Invitation code verifier for Spezi Firebase.
* @example
* const invitationCodeVerifier = new InvitationCodeVerifier(
* "invitationCodes",
* "users",
* /^[A-Z0-9]{6}$/
* );
*
* exports.checkInvitationCode = onCall(async (request) => {
* const {invitationCode} = request.data;
* await invitationCodeVerifier.enrollUserInStudy(request, invitationCode);
* return {};
* });
*/
class InvitationCodeVerifier {
/**
Expand Down

0 comments on commit f9dd48c

Please sign in to comment.