Exemple #1
0
 public IActionResult GetRoomDetailsParticipants(string roomId)
 {
     try
     {
         PokerDAO pokerDAO = new PokerDAO();
         return(new JsonResult(pokerDAO.getRoomDetails(roomId)));
     }
     catch (System.Exception)
     {
         return(NotFound(new { message = "Room Details Not Found" }));
     }
 }
Exemple #2
0
 public IActionResult GetHostName(string id)
 {
     try
     {
         PokerDAO pokerDAO = new PokerDAO();
         return(new JsonResult(pokerDAO.getHostNameValid(id)));
     }
     catch (System.Exception)
     {
         return(NotFound(new { message = "Host ID Not Found" }));
     }
 }
 public IActionResult GetStoryDetails(string roomId)
 {
     try
     {
         PokerDAO   pokerDAO     = new PokerDAO();
         JsonResult storyDetails = new JsonResult(pokerDAO.getStory(roomId));
         return(storyDetails);
     }
     catch (System.Exception)
     {
         return(NotFound(new { message = "Story Not Found" }));
     }
 }
 public IActionResult Delete(string roomId)
 {
     try
     {
         PokerDAO pokerDAO = new PokerDAO();
         pokerDAO.deleteRoom(roomId);
         return(Ok(new { message = "Room Deleted : " + roomId }));
     }
     catch (System.Exception e)
     {
         return(NotFound(new { message = e.Message }));
     }
 }
 public IActionResult Delete(string roomId, string empId)
 {
     try
     {
         PokerDAO pokerDAO = new PokerDAO();
         pokerDAO.leaveRoom(roomId, empId);
         return(Ok(new { message = "Room Left : " + "(" + roomId + "," + empId + ")" }));
     }
     catch (System.Exception e)
     {
         return(NotFound(new { message = e.Message }));
     }
 }