CS-Social-Good-CalPoly / Vera

6 stars 1 forks source link

#247 - Story Token (part 2) Complete #272

Closed seanmnguyen closed 8 months ago

seanmnguyen commented 8 months ago

I created the Tokens.js file in backend/models which creates and exports the TokenSchema. The TokenSchema has 2 attributes: 1) Value (string, required) which is the actual token, and 2) AssociatedStories (Array of strings, required) which is a list of references to the stories associated with the specific token.

Then, in backend/routes/stories.js, I used the /tokens URL to create a GET endpoint which returns all the tokens from the MongoDB collection. To test this, I added a few token documents with dummy data.

image

netlify[bot] commented 8 months ago

Deploy Preview for calpolyvera ready!

Name Link
Latest commit 7c01eabbb8e22dccaf00e850098e4284265e5bf9
Latest deploy log https://app.netlify.com/sites/calpolyvera/deploys/65eaa5ebb2bc360008f10704
Deploy Preview https://deploy-preview-272--calpolyvera.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.