feat: mock exercise template api (#613)

* feat: move mock exercise template to api

* feat: add template migration file

* chore:
- remove exercise templates form api
- rework api to pull exercise templates from db
- add exercise template seed to seed file
- declutter seed file

* chore:
- refactor template fetch to be dependent on the selected tag
- add tag to schema, remote db and template's seed file
- clear remote db's template table and replace data and their respective tags

* chore: add number of questions and center loading screen on the frontend

* chore: pr fixes

* chore: type fixes

* chore:
- move seed functionality to /seed folder
- add typing for individual seed functions
- pr fixes

* chore: pr fixes v2

* update output css

* refactor: update seeding script and schema definitions

- Renamed `seedTypes` to `seedQuestionTypes` for clarity in the seeding process.
- Enhanced the seeding script to include a command-line interface for better usability, allowing specific seed functions to be executed based on flags.
- Removed redundant unique constraints in the schema definitions for `courseNewsfeedComment` and `exerciseTemplate` to streamline database structure.

* feat: add email verification error handling page and update session management

- Introduced a new page for handling email verification errors, providing user-friendly messages based on error types.
- Updated session management logic to improve handling of public routes and session states.
- Enhanced security policies in the Svelte configuration to include additional sources for styles and scripts.
- Removed the old email verification error page to streamline the codebase.

* move the exercise template to cloudflare cdn

---------

Co-authored-by: Rotimi Best <best@classroomio.com>
This commit is contained in:
Adeyemi Adetunji
2025-12-25 05:09:27 +01:00
committed by GitHub
co-authored by Rotimi Best
parent ac3f35a97f
commit 50d6ee3111
263 changed files with 1568 additions and 37195 deletions
+10 -4
View File
@@ -38,21 +38,24 @@ const config = {
'https://*.i.posthog.com',
'https://*.senja.io',
'https://www.youtube.com',
'https://youtube.com'
'https://youtube.com',
'unsafe-hashes'
],
'style-src': [
'self',
'unsafe-inline',
'https://cdn.plyr.io',
'https://unpkg.com/katex@0.12.0/dist/katex.min.css',
'https://assets.cdn.clsrio.com/eqneditor_1.css'
'https://assets.cdn.clsrio.com/eqneditor_1.css',
'https://fonts.googleapis.com'
],
'style-src-elem': [
'self',
'unsafe-inline',
'https://cdn.plyr.io',
'https://unpkg.com/katex@0.12.0/dist/katex.min.css',
'https://assets.cdn.clsrio.com/eqneditor_1.css'
'https://assets.cdn.clsrio.com/eqneditor_1.css',
'https://fonts.googleapis.com'
],
'font-src': ['self', 'https://fonts.gstatic.com', 'https://cdn.plyr.io'],
'img-src': ['self', 'data:', 'https:'],
@@ -67,6 +70,7 @@ const config = {
'https://*.i.posthog.com',
'https://umami.hz.oncws.com',
'https://*.r2.cloudflarestorage.com',
'http://localhost:3002',
'http://localhost:54321',
'ws://localhost:54321',
'wss://*.classroomio.com',
@@ -89,7 +93,8 @@ const config = {
'https://*.i.posthog.com',
'https://*.senja.io',
'https://www.youtube.com',
'https://youtube.com'
'https://youtube.com',
'unsafe-hashes'
],
'style-src': [
'self',
@@ -119,6 +124,7 @@ const config = {
'https://*.i.posthog.com',
'https://umami.hz.oncws.com',
'https://*.r2.cloudflarestorage.com',
'http://localhost:3002',
'http://localhost:54321',
'ws://localhost:54321',
'wss://*.classroomio.com',