Exemple #1
0
 public ActionResult <Guid> AddLevel(Guid topicId, [FromBody] EmptyLevelDTO level)
 {
     var(_, isFailure, id, error) = applicationApi
                                    .AddEmptyLevel(
         topicId,
         level.Description,
         level.PreviousLevels,
         level.NextLevels);
     if (isFailure)
     {
         return(NotFound(error.Message));
     }
     return(Ok(id));
 }