Skip to content

Commit

Permalink
removing a modelstate check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Mill committed Nov 25, 2015
1 parent aa8ed94 commit c154073
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions TeamDBAwesome/TeamDBAwesome/Controllers/NewCustomerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public HttpResponseMessage Post([FromBody] Customer customer)
{
MySqlService dbService = new MySqlService();

if(ModelState.IsValid == true)
/*if(ModelState.IsValid == true)
{
dbService.AddNewUser(customer);
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
Expand All @@ -33,8 +33,13 @@ public HttpResponseMessage Post([FromBody] Customer customer)
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.BadRequest);
response.Content = new StringContent("Malformed Data");
return response;
}

}*/

dbService.AddNewUser(customer);
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent("0");
return response;

}

}
Expand Down

0 comments on commit c154073

Please sign in to comment.