Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
esq => {
toast.info(this.$translate.instant('sitnet_question_saved'));
// apply changes back to scope
ng.extend(this.sectionQuestion, esq);
});
this.CollaborativeExam.createExam().then((exam: CollaborativeExam) => {
toast.info(this.$translate.instant('sitnet_exam_created'));
this.$location.path(`/exams/collaborative/${exam.id}/1`);
}).catch(resp => toast.error(resp.data));
}
.then((resp: angular.IHttpResponse) => {
toast.info(this.$translate.instant('sitnet_updated'));
this.close(
{
$value: {
msg: 'Accepted',
machine: resp.data
}
});
}).catch(resp => toast.error(resp.data));
}
this.Exam.updateExam(this.exam, config, this.collaborative).then(() => {
if (!silent) {
toast.info(this.$translate.instant('sitnet_exam_saved'));
}
deferred.resolve();
}, (err: string) => {
toast.error(err);
this.Reservation.cancelReservation(reservation).then(() => {
this.reservations.splice(this.reservations.indexOf(reservation), 1);
toast.info(this.$translate.instant('sitnet_reservation_removed'));
}).catch(angular.noop);
}