From 6602fdf307078ed4cd178e2a9e20bc9d8676970c Mon Sep 17 00:00:00 2001 From: SodhiA1 <38086281+SodhiA1@users.noreply.github.com> Date: Tue, 17 Oct 2023 17:19:55 -0700 Subject: [PATCH] EDX-1892: relink user fixes --- backend/src/components/edx/exchange.js | 2 ++ frontend/src/components/secure-message/AccessUserCard.vue | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backend/src/components/edx/exchange.js b/backend/src/components/edx/exchange.js index 153f676f9..c126d4f49 100644 --- a/backend/src/components/edx/exchange.js +++ b/backend/src/components/edx/exchange.js @@ -853,6 +853,7 @@ async function relinkUserSchoolOrDistrictAccess(req, res) { email: edxUserDetails.email, edxUserId: req.body.params.userToRelink, edxUserSchoolID: req.body.params.userSchoolID, + edxUserExpiryDate: req.body.params.edxUserExpiryDate }; await postData(token, config.get('server:edx:exchangeURL') + '/school-user-activation-relink-saga', payload,null, userName); } else { @@ -867,6 +868,7 @@ async function relinkUserSchoolOrDistrictAccess(req, res) { email: edxUserDetails.email, edxUserId: req.body.params.userToRelink, edxUserDistrictID: req.body.params.edxUserDistrictID, + edxUserExpiryDate: req.body.params.edxUserExpiryDate }; await postData(token, config.get('server:edx:exchangeURL') + '/district-user-activation-relink-saga', payload,null, userName); } diff --git a/frontend/src/components/secure-message/AccessUserCard.vue b/frontend/src/components/secure-message/AccessUserCard.vue index 62857d7d4..8c6f3bab5 100644 --- a/frontend/src/components/secure-message/AccessUserCard.vue +++ b/frontend/src/components/secure-message/AccessUserCard.vue @@ -391,6 +391,7 @@ export default { const payload = { params: { userToRelink: this.user.edxUserID, + edxUserExpiryDate: this.getExpiryDate(this.user) } }; if (this.instituteTypeCode === 'SCHOOL') { @@ -402,6 +403,7 @@ export default { payload.params.districtID = this.instituteCode; payload.params.edxUserDistrictID = userDistrict.edxUserDistrictID; } + ApiService.apiAxios.post(Routes.edx.EXCHANGE_RELINK_USER, payload) .then(() => { this.setSuccessAlert('User has been removed, email sent with instructions to re-link.');