示例#1
0
 public JsonResult Get(Guid id)
 {
     try
     {
         var devices = devicesRepository.RetrieveByPK(id);
         if (devices == null || devices.User != CurrentUser(hunter))
         {
             return(JsonResponse(ResponseType.error, ResponseMessage.ItemNotFound));
         }
         return(JsonResponse(devices));
     }
     catch (Exception ex)
     {
         return(InternalException(ex));
     }
 }