Skip to content

Commit

Permalink
Updates for create school behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Oct 27, 2023
1 parent da5a9bd commit 55e380d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const handleJetStreamMessage = async (err, msg) => {
};

async function handleInstituteEvent(data) {
logger.info('Received institute message: ' + JSON.stringify(data.eventPayload));
logger.info('Received institute message: ' + JSON.stringify(data));
NATS.publishMessage(CONSTANTS.INSTITUTE_CACHE_REFRESH_TOPIC, StringCodec().encode(safeStringify(data))).then(() => { // publish the message only if key was present in redis, otherwise just acknowledge to STAN.
logger.info(`Message published to ${CONSTANTS.INSTITUTE_CACHE_REFRESH_TOPIC}`, data);
});
Expand Down
7 changes: 2 additions & 5 deletions frontend/src/components/institute/NewSchoolPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -750,22 +750,19 @@ export default {
this.processing = true;
ApiService.apiAxios.post(`${Routes.edx.CREATE_SCHOOL}`, {school: this.newSchool, user: this.initialUser})
.then((response) => {
.then(() => {
this.setSuccessAlert('Success! The school is being created.');
this.resetForm();
this.openSchoolDetailsPage(response.data.schoolId);
})
.catch(error => {
this.setFailureAlert(error.response?.data?.message || error.message);
console.log(error);
})
.finally(() => {
this.processing = false;
this.closeNewSchoolPage();
});
},
openSchoolDetailsPage(schoolID) {
this.$router.push({name: 'schoolDetails', params: {schoolID: schoolID}});
},
schoolDistrictChanged() {
this.schoolCategoryDisabled = false;
Expand Down

0 comments on commit 55e380d

Please sign in to comment.