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 eGRID 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 transformEgridData() function to convert each object into an EgridRecord type, and populate the database with each record.
Acceptance Criteria
The database is populated with the fetched eGRID data with a request to /api/egrid.
Steps:
Modify the function transformEgridData() in src/services/egrid-fetch.ts to convert an object corresponding to an eGRID record into an EgridRecord
In app/egrid/route.ts:
Iterate over the EgridRecord objects in transformedData and call addEgridRecord() 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 eGRID 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
transformEgridData()
function to convert each object into anEgridRecord
type, and populate the database with each record.Acceptance Criteria
The database is populated with the fetched eGRID data with a request to
/api/egrid
.Steps:
transformEgridData()
insrc/services/egrid-fetch.ts
to convert an object corresponding to an eGRID record into anEgridRecord
app/egrid/route.ts
:EgridRecord
objects intransformedData
and calladdEgridRecord()
for each to save them as a document in the collectionAdditional Information
The text was updated successfully, but these errors were encountered: