public async Task <IActionResult> InitSelectionCards(string setting) { try { if (setting == "select") { var result = await _cardsService.InitSelectionCards(); return(Ok(result)); } else { throw new Exception("Enter init to initialize DB!"); } } catch (Exception ex) { var errorMessage = "There was an error while trying to list Selection Cards from MongoDB"; return(BadRequest(errorMessage + "\n" + ex)); } }