cosmicds / cds-api

API for accessing the CosmicDS database
GNU General Public License v3.0
0 stars 3 forks source link

Dashboard class groups #93

Closed Carifio24 closed 1 year ago

Carifio24 commented 1 year ago

This PR adds the SQL and model for a table describing dashboard class groups. Since I don't imagine this will be a long-term thing, I didn't want to create a junction table as well, so the associated class IDs for a group are just stored as a list of integers in MySQL's JSON format.

Additionally, this adds an endpoint /dashboard-class-groups<code>, which will return an object whose class_ids field is list of class IDs associated with the class group corresponding to the given code. If the code isn't found, the response code is a 404 and the response will just contain an error message.