Beispiel #1
0
 public HttpResponseMessage GetBillingItem_ByUser(string token)
 {
     if (con.CheckIfTokenValid(token) != 10001 && con.IsUserInternal(token) == 1)
     {
         return(new HttpResponseMessage(HttpStatusCode.Unauthorized));
     }
     try
     {
         return(new HttpResponseMessage(HttpStatusCode.OK)
         {
             Content = new StringContent(JsonConvert.SerializeObject(con.GetBillingItem_ByUser(token), Formatting.None))
         });
     }
     catch (Exception ex)
     {
         ExceptionLog.LogException(ex);
         return(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }