Added question generating API

This commit is contained in:
2021-11-28 18:17:50 +00:00
parent 2d1cdd5e94
commit e730607c66
3 changed files with 73 additions and 6 deletions

View File

@ -26,7 +26,8 @@ $('form[name=form-quiz-start]').submit(function(event) {
data: data,
dataType: 'json',
success: function(response) {
window.location.href = "/admin/login/";
var _id = response._id
window.location.href = `/api/questions/${_id}`;
},
error: function(response) {
if (typeof response.responseJSON.error === 'string' || response.responseJSON.error instanceof String) {