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:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user