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