elderwand 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -200,7 +200,11 @@ module.exports.inherit = function (child) {
|
|
|
200
200
|
res.model = model
|
|
201
201
|
res.model[child.singularName] = model
|
|
202
202
|
res.statusData = "Success"
|
|
203
|
-
|
|
203
|
+
if(req.anyKey.__redirectUrl){
|
|
204
|
+
return res.redirect(req.anyKey.__redirectUrl);
|
|
205
|
+
}else{
|
|
206
|
+
return res.redirect('/' + child.pluralName);
|
|
207
|
+
}
|
|
204
208
|
} else if (child.onError) {
|
|
205
209
|
//console.log(err);
|
|
206
210
|
res.statusData = "Error"
|
|
@@ -315,7 +319,12 @@ module.exports.inherit = function (child) {
|
|
|
315
319
|
req.flash('success', child.title + ' Başarıyla Güncellendi');
|
|
316
320
|
res.model = model
|
|
317
321
|
res.statusData = "Success"
|
|
318
|
-
|
|
322
|
+
|
|
323
|
+
if(req.anyKey.__redirectUrl){
|
|
324
|
+
return res.redirect(req.anyKey.__redirectUrl);
|
|
325
|
+
}else{
|
|
326
|
+
return res.redirect('/' + child.pluralName);
|
|
327
|
+
}
|
|
319
328
|
} else if (child.onError) {
|
|
320
329
|
// console.log(err);
|
|
321
330
|
req.flash('info', 'Bilinmeyen bir hata oluştu');
|
|
@@ -422,7 +431,12 @@ module.exports.inherit = function (child) {
|
|
|
422
431
|
model.remove(function (err) {
|
|
423
432
|
req.flash('info', 'Başarıyla Silindi');
|
|
424
433
|
res.statusData = "Success"
|
|
425
|
-
|
|
434
|
+
|
|
435
|
+
if(req.anyKey.__redirectUrl){
|
|
436
|
+
return res.redirect(req.anyKey.__redirectUrl);
|
|
437
|
+
}else{
|
|
438
|
+
return res.redirect('/' + child.pluralName);
|
|
439
|
+
}
|
|
426
440
|
});
|
|
427
441
|
}else{
|
|
428
442
|
req.flash('info', 'Bu işlemi yapmak için yetkiniz yok');
|
|
@@ -467,7 +481,12 @@ module.exports.inherit = function (child) {
|
|
|
467
481
|
child.model.deleteMany(criteria, function(err){
|
|
468
482
|
req.flash('info', 'Başarıyla Silindi');
|
|
469
483
|
res.statusData = "Success"
|
|
470
|
-
|
|
484
|
+
|
|
485
|
+
if(req.anyKey.__redirectUrl){
|
|
486
|
+
return res.redirect(req.anyKey.__redirectUrl);
|
|
487
|
+
}else{
|
|
488
|
+
return res.redirect('/' + child.pluralName);
|
|
489
|
+
}
|
|
471
490
|
})
|
|
472
491
|
}
|
|
473
492
|
|