Skip to content

Commit

Permalink
πŸ“ˆ server: set phone context before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
cruzdanilo committed Jan 10, 2025
1 parent 7da454a commit d0067db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/api/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default app
if (!inquiry) return c.json("kyc not found", 404);
if (inquiry.attributes.status !== "approved") return c.json("kyc not approved", 403);
if (credential.cards.length > 0) return c.json("card already exists", 400);
setContext("phone", { inquiry: inquiry.id, phone: inquiry.attributes["phone-number"] });
const phone = parsePhoneNumberWithError(
inquiry.attributes["phone-number"].startsWith("+")
? inquiry.attributes["phone-number"]
Expand Down

0 comments on commit d0067db

Please sign in to comment.