diff --git a/src/utils/api/gymApplication.ts b/src/utils/api/gymApplication.ts index 93ec8b608ece4d44ba278dc757daffc79f1c9f49..c317ca8a0711000b7290d3ae17e23167170abffa 100644 --- a/src/utils/api/gymApplication.ts +++ b/src/utils/api/gymApplication.ts @@ -42,8 +42,21 @@ export async function applyToGym({ application_description, gym_id, gym_name, + username, + email, + trainer_name, + description, }: GymApplicationSent): Promise<GymApplicationReturned> { - const res = (await (await axios.post(`${config.NODE_JS_API}/api/job/apply`, header)).data); + const reqBody = { + gym_name, + username, + gym_id, + email, + trainer_name, + description, + application_description, + }; + const res = (await axios.post(`${config.NODE_JS_API}/api/job/apply`, reqBody, header)); if (res.status !== 200) { throw new Error("Failed to apply to gym"); }