{"action":"closed","issue":{"url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/428","repository_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project","labels_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/428/comments","events_url":"https://api.github.com/repos/ga-wdi-boston/full-stack-project/issues/428/events","html_url":"https://github.com/ga-wdi-boston/full-stack-project/issues/428","id":180888630,"number":428,"title":"Sign up/post request not working through site","user":{"login":"rosmith76","id":20599957,"avatar_url":"https://avatars.githubusercontent.com/u/20599957?v=3","gravatar_id":"","url":"https://api.github.com/users/rosmith76","html_url":"https://github.com/rosmith76","followers_url":"https://api.github.com/users/rosmith76/followers","following_url":"https://api.github.com/users/rosmith76/following{/other_user}","gists_url":"https://api.github.com/users/rosmith76/gists{/gist_id}","starred_url":"https://api.github.com/users/rosmith76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosmith76/subscriptions","organizations_url":"https://api.github.com/users/rosmith76/orgs","repos_url":"https://api.github.com/users/rosmith76/repos","events_url":"https://api.github.com/users/rosmith76/events{/privacy}","received_events_url":"https://api.github.com/users/rosmith76/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-10-04T13:10:26Z","updated_at":"2016-10-04T14:28:29Z","closed_at":"2016-10-04T14:28:28Z","body":"I can create a new user with a curl request through the API, but I get a 400 bad request through the browser site. \r\ncode below\r\n```.html\r\n  <button type=\"button\" class=\"btn btn-primary btn-lg\" data-toggle=\"modal\" data-target=\"#sign-up-button\">Sign Up</button>\r\n\r\n      <div class=\"modal fade\" id=\"sign-up-button\" tabindex=\"-1\"role=\"dialog\" aria-labelledby=\"signUpModalLabel\">\r\n       <div class=\"modal-dialog\" role=\"document\">\r\n         <div class=\"modal-content\">\r\n           <form id=\"sign-up\">\r\n             <fieldset>\r\n               <legend>Sign Up</legend>\r\n               <input type= \"text\" name= \"given_name\" placeholder=\"first name\">\r\n               <input type= \"text\" name= \"surname\" placeholder=\"last name\">\r\n               <input type= \"email\" name= \"credentials[email]\" placeholder=\"enter your email\">\r\n               <input type= \"password\" name= \"credentials[password]\" placeholder=\"enter your password\">\r\n               <input type= \"password\" name= \"credentials[password_confirmation]\" placeholder=\"confirm your password\">\r\n               <input type=\"submit\" name=\"submit\" value=\"Sign up!\">\r\n             </fieldset>\r\n           </form>\r\n           <div class=\"modal-header\">\r\n             <button type=\"button\" class=\"close\" data-dismiss=\"modal\"\r\n               aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\r\n           </div>\r\n         </div>\r\n       </div>\r\n     </div>\r\n```\r\n\r\nUI JS\r\n```.js\r\nconst signInSuccess = (data) => {\r\n  app.user = data.user;\r\n};\r\n```\r\nAPI JS\r\n```.js\r\nconst signUp = (data) => {\r\n  return $.ajax({\r\n    url: app.host + '/sign-up/',\r\n    method: 'POST',\r\n    data: data,\r\n  });\r\n};\r\n```\r\nEvents JS\r\n```.js\r\nconst onSignUp = function (event) {\r\n  let data = getFormFields (event.target);\r\n  event.preventDefault();\r\n  api.signUp(data)\r\n    .done(ui.success)\r\n    .fail(ui.failure);\r\n};\r\n```\r\n\r\nAPP JS\r\n```.js\r\nconst app = {\r\n  host: 'http://localhost:3000'\r\n  // host: 'https://shrouded-taiga-89115.herokuapp.com'\r\n};\r\n\r\n\r\nmodule.exports = app;\r\n```"}}
{"actor":{"display_login":"rosmith76"}}