/roster-info/:classID/:storyName: This endpoint yields all of the story states, student usernames, and student emails for the given story and class.
/roster-info/:classID: This endpoint yields the information above for all of the stories that the given class is using. The results are keyed by story name.
This PR also creates associations between some tables, in src/associations.ts. Basically, this is a way of telling Sequelize about the associations that we've created using join tables. I've used this in these roster-info queries, and this should help write complicated queries more easily in Sequelize in the future.
Endpoint for roster data
This PR adds two new endpoints:
/roster-info/:classID/:storyName
: This endpoint yields all of the story states, student usernames, and student emails for the given story and class./roster-info/:classID
: This endpoint yields the information above for all of the stories that the given class is using. The results are keyed by story name.This PR also creates associations between some tables, in
src/associations.ts
. Basically, this is a way of tellingSequelize
about the associations that we've created using join tables. I've used this in these roster-info queries, and this should help write complicated queries more easily inSequelize
in the future.