As a user, I should be able to add my own personal news articles to the dashboard
Acceptance Criteria
CREATE:
GIVEN a user wants to record a news article on their dashboard
WHEN the user performs a gesture on a New Article affordance
THEN a form should be presented to the user in which the following information can be entered
News title
Synopsis
URL
GIVEN a user has entered in all field values for storing a new article
WHEN the user performs a gesture on the Save Article affordance
THEN the article should be saved in the database, and assigned to the user
Development
create a newsData file containing a promise to getNewsByUid via axios.get the apiKeys
Object.keys(newsResults).forEach((storyId) => to push the object id results into a newsarray,
and resolve the array
addStory = newsObject => axios.post
create a news.js file with a newsBuilder = (uid) =>
include inputs form with: id="newsTitle", "imageUrl", and "synopsis"
include a saveButtonid="saveButton" for the inputs
add eventListeners to saveButton to call newsData.addStory
User Story
As a user, I should be able to add my own personal news articles to the dashboard
Acceptance Criteria
CREATE: GIVEN a user wants to record a news article on their dashboard WHEN the user performs a gesture on a New Article affordance THEN a form should be presented to the user in which the following information can be entered
News title Synopsis URL GIVEN a user has entered in all field values for storing a new article WHEN the user performs a gesture on the Save Article affordance THEN the article should be saved in the database, and assigned to the user
Development
newsData
file containing a promise togetNewsByUid
viaaxios.get
theapiKeys
Object.keys(newsResults).forEach((storyId) =>
to push the object id results into anews
array, and resolve the arrayaddStory = newsObject => axios.post
news.js
file with anewsBuilder = (uid) =>
"newsTitle"
,"imageUrl"
, and"synopsis"
saveButton
id="saveButton"
for the inputssaveButton
to callnewsData.addStory