feat: mettre à jour le flux de travail de déploiement pour déclencher sur la branche principale et améliorer le processus de transfert de source

This commit is contained in:
mirage
2026-03-27 12:29:35 +01:00
parent da7597117b
commit 15d8176c97
2 changed files with 7 additions and 16 deletions

View File

@@ -103,12 +103,6 @@ namespace Webzine.Repository
.Include(a => a.Titres)
.FirstOrDefault(a => a.Nom == nom);
if (artiste == null)
{
this.logger.LogWarning("Pas d'artiste au nom {Nom}", nom);
artiste = new Artiste();
}
return artiste;
}
catch (Exception ex)

View File

@@ -36,7 +36,7 @@
if (string.IsNullOrEmpty(nom))
{
this.logger.LogWarning("Nom de l'artiste manquant dans la requête.");
return RedirectToAction("Index");
return this.RedirectToAction("Index", "Accueil");
}
// On transforme "fatal-bazooka" en "Fatal Bazooka" pour la factory
@@ -46,26 +46,23 @@
// On appelle la factory pour obtenir l'artiste unique
var artiste = this._artisteRepository.FindByName(nomPropre);
// Check if artiste was found
if (artiste == null)
{
this.logger.LogWarning("Artiste non trouvé pour le nom : {NomArtiste}", nomPropre);
return RedirectToAction("Index");
this.logger.LogWarning("Artiste non trouvé avec le nom : {NomArtiste}", nomPropre);
return this.RedirectToAction("Index", "Accueil");
}
var viewModel = new ArtisteDetailsViewModel
{
IdArtiste = artiste.IdArtiste,
Nom = artiste.Nom,
Biographie = artiste.Biographie,
// On effectue le groupement ici une bonne fois pour toutes
AlbumsGroupes = artiste.Titres
.OrderBy(t => t.Libelle)
.GroupBy(t => t.Album)
.OrderBy(g => g.Key),
AlbumsGroupes = artiste.Titres.GroupBy(t => t.Album),
};
this.logger.LogInformation("Artiste trouvé : {NomArtiste}", nom);
return View(viewModel);
return this.View(viewModel);
}
}
}