Open PaulPatterson48 opened 12 months ago
GIVEN: Authenticated User should navigate to '/new' and see an h1 tag that says 'Add a Member'
Add a member on the navbar
api\playerData.js CREATE Promise is a 'POST' navbar.js
const createBook = (payload) => new Promise((resolve, reject) => { fetch(${endpoint}/books.json, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }) .then((response) => response.json()) .then((data) => resolve(data)) .catch(reject); });
${endpoint}/books.json
User Story
GIVEN: Authenticated User should navigate to '/new' and see an h1 tag that says 'Add a Member'
Acceptance Criteria
Add a member on the navbar
Dependecies
api\playerData.js CREATE Promise is a 'POST' navbar.js
Dev Notes
const createBook = (payload) => new Promise((resolve, reject) => { fetch(
${endpoint}/books.json
, { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }) .then((response) => response.json()) .then((data) => resolve(data)) .catch(reject); });