diff --git a/components/global/Footer/ContactForm.js b/components/global/Footer/ContactForm.js index 9d598e93..ccb132ef 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, @@ -46,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"); diff --git a/lib/api/auth.js b/lib/api/auth.js index 69a0712a..ebbc58b7 100644 --- a/lib/api/auth.js +++ b/lib/api/auth.js @@ -131,19 +131,17 @@ export async function registerEducator({ registerEducators( email: "${email}" password: "${password}" - firstName: "${firstName}" - lastName: "${lastName}" - ) { - jwt - jwtExpiresAt - refreshToken - refreshTokenExpiresAt + fullName: "${firstName} ${lastName}") { user { status ... on User { requestDeletion } } + jwt + jwtExpiresAt + refreshToken + refreshTokenExpiresAt } } `; 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",