示例#1
0
 public IActionResult Ajouter_Style([FromQuery] string style)
 {
     if (!CstSortMusic.Instance.Styles.Contains(style) && !string.IsNullOrEmpty(style))
     {
         CstSortMusic.Instance.Styles.Add(style);
         ConfigurationDAO.SaveStyle();
         return(Ok());
     }
     else
     {
         return(BadRequest());
     }
 }
示例#2
0
        public IActionResult Supprimer_Style([FromQuery] string style)
        {
            if (CstSortMusic.Instance.Styles.Contains(style))
            {
                CstSortMusic.Instance.Styles.Remove(style);
                ConfigurationDAO.SaveStyle();

                return(NoContent());
            }
            else
            {
                return(NotFound());
            }
        }