From b4171963f011a7fbb7233e1eecfc848a21f8f069 Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Thu, 16 Mar 2023 10:37:44 -0700 Subject: [PATCH 1/4] [C] update GQL for Craft 4 fields --- components/global/Footer/ContactForm.js | 1 + lib/api/auth.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/global/Footer/ContactForm.js b/components/global/Footer/ContactForm.js index 9d598e93..492369c3 100644 --- a/components/global/Footer/ContactForm.js +++ b/components/global/Footer/ContactForm.js @@ -14,6 +14,7 @@ async function postFormData(data) { const objectifiedData = Object.fromEntries(data); const body = JSON.stringify({ ...objectifiedData, + fromName: "", message: { body: objectifiedData.message, Topic: objectifiedData.topic, diff --git a/lib/api/auth.js b/lib/api/auth.js index 69a0712a..64800672 100644 --- a/lib/api/auth.js +++ b/lib/api/auth.js @@ -131,8 +131,10 @@ export async function registerEducator({ registerEducators( email: "${email}" password: "${password}" - firstName: "${firstName}" - lastName: "${lastName}" + user: { + firstName: "${firstName}" + lastName: "${lastName}" + } ) { jwt jwtExpiresAt From 935e4ca3724376e639ad97da89677de1af0bc17b Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Thu, 16 Mar 2023 10:39:51 -0700 Subject: [PATCH 2/4] [C] inc version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e78626ca..3d819a59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rubin-client", - "version": "1.2.5", + "version": "1.2.7", "private": true, "repository": { "type": "git", From 71fd25bc9507c1eae282e822c265c6f7012e88be Mon Sep 17 00:00:00 2001 From: Alexandra Goff Date: Thu, 16 Mar 2023 11:59:01 -0700 Subject: [PATCH 3/4] [C] remove additional contact error check --- components/global/Footer/ContactForm.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/components/global/Footer/ContactForm.js b/components/global/Footer/ContactForm.js index 492369c3..ccb132ef 100644 --- a/components/global/Footer/ContactForm.js +++ b/components/global/Footer/ContactForm.js @@ -47,12 +47,8 @@ function ContactForm({ topics = [], className }) { const formData = new FormData(event.target); await postFormData(formData) - .then((data) => { - if (data.success) { - setStatus("success"); - } else { - setStatus("error"); - } + .then(() => { + setStatus("success"); }) .catch((error) => { setStatus("error"); From 8c25aba1c6c5dfe845d47b8caada1205f97c7145 Mon Sep 17 00:00:00 2001 From: Eric Rosas Date: Thu, 16 Mar 2023 11:13:20 -0700 Subject: [PATCH 4/4] Modified educator signup query to allow fullName EPO-7830 --- lib/api/auth.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/api/auth.js b/lib/api/auth.js index 64800672..ebbc58b7 100644 --- a/lib/api/auth.js +++ b/lib/api/auth.js @@ -131,21 +131,17 @@ export async function registerEducator({ registerEducators( email: "${email}" password: "${password}" - user: { - firstName: "${firstName}" - lastName: "${lastName}" - } - ) { - jwt - jwtExpiresAt - refreshToken - refreshTokenExpiresAt + fullName: "${firstName} ${lastName}") { user { status ... on User { requestDeletion } } + jwt + jwtExpiresAt + refreshToken + refreshTokenExpiresAt } } `;