-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatted verify email, passing first/last on signup, fix properties API
- Loading branch information
1 parent
90f91b3
commit 816713d
Showing
5 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
import { formatEmail } from "../utils"; | ||
|
||
export const customMessageSignUp = async (event) => { | ||
event.response.emailSubject = `Equalify Verification Code`; | ||
event.response.emailMessage = formatEmail({ body: `<p>Hey there,</p><p>Your Equalify verification code is ${event.request.codeParameter}.</p><p>Thank you,<br/>Equalify` }); | ||
return event; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { pgClient } from "../utils/index.js"; | ||
|
||
export const postConfirmationConfirmSignUp = async (event) => { | ||
const { sub, email, name } = event.request.userAttributes; | ||
const { sub, email, given_name, family_name } = event.request.userAttributes; | ||
await pgClient.connect(); | ||
await pgClient.query(` | ||
INSERT INTO "users" ("id", "email", "name") VALUES ($1, $2, $3) | ||
`, [sub, email, name]); | ||
INSERT INTO "users" ("id", "email", "first_name", "last_name") VALUES ($1, $2, $3, $4) | ||
`, [sub, email, given_name, family_name]); | ||
await pgClient.clean(); | ||
return event; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters