Merge branch 'dev' into j3/feat/filter
# Conflicts: # Webzine.WebApplication/Areas/Administration/Controllers/CommentaireController.cs # Webzine.WebApplication/Controllers/ArtisteController.cs # Webzine.WebApplication/Controllers/RechercheController.cs
This commit is contained in:
@@ -31,8 +31,7 @@ public class ArtisteController : Controller
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Affiche la liste des artistes. Pour l'instant, les artistes sont générés à partir de noms prédéfinis via la méthode SeedArtisteByName de la classe ArtisteFactory.
|
||||
/// Chaque artiste est ensuite ajouté à une liste d'artistes qui est passée à la vue.
|
||||
/// Affiche la liste des artistes.
|
||||
/// </summary>
|
||||
/// <returns>Redirection.</returns>
|
||||
public IActionResult Index()
|
||||
@@ -148,7 +147,6 @@ public class ArtisteController : Controller
|
||||
this.artisteRepository.Delete(artiste);
|
||||
}
|
||||
|
||||
// 3. Redirect back to the list (or wherever you want them to go after)
|
||||
return this.RedirectToAction("Index");
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ namespace Webzine.WebApplication.Areas.Administration.Controllers
|
||||
using Webzine.WebApplication.Areas.Administration.ViewModels.Commentaire;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Contrôleur pour la gestion des commentaires dans l'administration du webzine. Ce contrôleur permet d'afficher la liste des commentaires, de supprimer un commentaire spécifique et de gérer les interactions liées aux commentaires dans l'interface d'administration.
|
||||
/// </summary>
|
||||
[Area("Administration")]
|
||||
public class CommentaireController : Controller
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
namespace Webzine.WebApplication.Areas.Administration.Controllers;
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
using Webzine.Business.Contracts;
|
||||
using Webzine.Business.Contracts.Dto;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Webzine.Repository.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// Contrôleur pour gérer le tableau de bord de l'administration.
|
||||
/// </summary>
|
||||
[Area("Administration")]
|
||||
public class DashboardController : Controller
|
||||
{
|
||||
|
||||
@@ -184,6 +184,12 @@ public class TitreController : Controller
|
||||
public IActionResult Delete(AdminTitreDelete model)
|
||||
{
|
||||
var titre = this.titreRepository.Find(model.Id);
|
||||
|
||||
if (!this.ModelState.IsValid)
|
||||
{
|
||||
return this.View(model);
|
||||
}
|
||||
|
||||
if (titre != null)
|
||||
{
|
||||
this.titreRepository.Delete(titre);
|
||||
|
||||
Reference in New Issue
Block a user