예제 #1
0
 public IHttpActionResult SaveCampaignRecorderForAgents([FromBody] List <SocialMediaAccount> urls)
 {
     try
     {
         DataWriter dw          = new DataWriter();
         bool       saveSuccess = dw.AddSocialMediaAccounts(urls);
         if (saveSuccess)
         {
             return(Ok(urls));
         }
         return(StatusCode(HttpStatusCode.BadRequest));
     }
     catch (Exception e)
     {
         if (e.InnerException != null)
         {
             return(InternalServerError(e.InnerException));
         }
         return(InternalServerError(e));
     }
 }