You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Our AVERT data fetcher successfully fetches the data from the EPA website, but it currently only returns the data in the response rather than writing it to our MongoDB collection.
Modify the transformAvertData() function to convert each object into an AvertRecord type, and populate the database with each record.
Acceptance Criteria
The database is populated with the fetched AVERT data with a request to /api/avert.
Steps:
Modify the function transformAvertData() in src/services/avert-fetch.ts to convert an object corresponding to an AVERT record into an AvertRecord
In app/avert/route.ts:
Iterate over the AvertRecord objects in transformedData and call addAvertRecord() for each to save them as a document in the collection
Update the response to remove the transformed data and return success or failure on upload
Additional Information
The text was updated successfully, but these errors were encountered:
Description
Our AVERT data fetcher successfully fetches the data from the EPA website, but it currently only returns the data in the response rather than writing it to our MongoDB collection.
Modify the
transformAvertData()
function to convert each object into anAvertRecord
type, and populate the database with each record.Acceptance Criteria
The database is populated with the fetched AVERT data with a request to
/api/avert
.Steps:
transformAvertData()
insrc/services/avert-fetch.ts
to convert an object corresponding to an AVERT record into anAvertRecord
app/avert/route.ts
:AvertRecord
objects intransformedData
and calladdAvertRecord()
for each to save them as a document in the collectionAdditional Information
The text was updated successfully, but these errors were encountered: