Controllers

Parent namespace: Commissiestrijd

Classes

TypeDescription
ImageControllerController for handling image retrieval. This controller allows users to retrieve images by filename. It checks if the user is an admin before allowing access to the images. The images are stored in the "submittedimages" directory within the current working directory. The images are served with the appropriate MIME type based on their file extension. If the image does not exist, a 404 Not Found response is returned.
LeaderboardControllerController for handling leaderboard operations. This controller allows users to retrieve the leaderboard based on submitted tasks within a specified date range. It checks if the user is authorized before allowing access to the leaderboard. The leaderboard is generated by summing the points of approved tasks grouped by committee.
PeriodControllerController for handling period operations. This controller allows users to create, retrieve, update, and delete periods. It checks if the user is authorized before retrieving periods, and it checks if the user is an admin before creating, updating, or deleting periods. The periods are defined by a name, start date, and end date.
PossibleTaskControllerController for handling possible task operations. This controller allows administrators to manage possible tasks, including creating, editing, retrieving, and activating/deactivating tasks. It checks if the user is an admin before allowing access to these operations. The possible tasks are stored in the application's database and can be retrieved or modified as needed.
StatusControllerController for handling status operations. This controller allows users to check the status of the application. It provides a simple endpoint to verify if the application is online.
SubmittedTaskControllerController for handling submitted tasks. This controller allows users to submit tasks, approve or reject submitted tasks, and retrieve lists of submitted tasks based on their status. It checks if the user is authorized before allowing access to the endpoints. The submitted tasks are stored in the database and can be filtered by committee or status.