コード例 #1
0
 private IHttpActionResult SaveRegistration(string token, CincinnatiRegistration goVolunteerRegistration)
 {
     try
     {
         var reg = _goVolunteerService.CreateRegistration(goVolunteerRegistration, token);
         return(Ok(reg));
     }
     catch (Exception e)
     {
         var msg = "GoVolunteerRegistrationController: POST " + goVolunteerRegistration;
         logger.Error(msg, e);
         var apiError = new ApiErrorDto(msg, e);
         throw new HttpResponseException(apiError.HttpResponseMessage);
     }
 }
コード例 #2
0
 private IHttpActionResult SaveRegistration(string token, Registration goVolunteerRegistration)
 {
     try
     {
         goVolunteerRegistration.InitiativeId = _configurationWrapper.GetConfigIntValue("GoCincinnatiInitativeId");
         var reg = _goVolunteerService.CreateRegistration(goVolunteerRegistration, token);
         return(Ok(reg));
     }
     catch (Exception e)
     {
         var msg = "GoVolunteerRegistrationController: POST " + goVolunteerRegistration;
         logger.Error(msg, e);
         var apiError = new ApiErrorDto(msg, e);
         throw new HttpResponseException(apiError.HttpResponseMessage);
     }
 }