ga-wdi-boston/browser-template-ARCHIVED

Refactor examples in forms.md

Closed this issue · 2 comments

The object returned can be used to validate the form data.

in api.js

```js
'use strict';

const ajaxDefaults = {
-  url: 'http://localhost:3000',
+ -  url: 'http://localhost:7165',
};

const myRequest = (data, success, fail) => {
  $.ajax(Object.assign({ method: 'POST', data }, ajaxDefaults))
  .done(success)
  .fail(fail);
};

module.exports = {
  myRequest,
};
gaand commented

☝️ is not how the browser template is used anymore.