feat: enhance exercise management and media handling
- Introduced new API endpoints for managing exercise media, including upload, update, delete, and reorder functionalities. - Updated the exercise creation and update logic to ensure goal and execution fields are validated and normalized. - Refactored frontend components to support the new exercise media features, including a dedicated import section for complete stack files. - Removed the deprecated ExercisesPage component and replaced it with a more modular structure for exercise management. - Incremented database schema version to 20260427028 and updated changelog to reflect these changes.
This commit is contained in:
1 parent
2452b5e2e8
commit
cb11e39201
13 files changed
+1837
-776
No files matched your search
@@ -12,7 +12,7 @@ import uuid
|
||||
from datetime import datetime, timezone
|
||||
from typing import Any, Dict, List, Optional, Tuple
|
||||
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from fastapi import APIRouter, Body, Depends, HTTPException
|
||||
from fastapi.encoders import jsonable_encoder
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
@@ -336,7 +336,10 @@ def _upsert_skill_category(
|
||||
return old_id, new_id
|
||||
|
||||
|
||||
def import_matrix_stack_v1(data: Dict[str, Any], session: dict = Depends(require_auth)) -> Dict[str, Any]:
|
||||
def import_matrix_stack_v1(
|
||||
data: Dict[str, Any] = Body(...),
|
||||
session: dict = Depends(require_auth),
|
||||
) -> Dict[str, Any]:
|
||||
_require_admin(session)
|
||||
if data.get("kind") != KIND_V1:
|
||||
raise HTTPException(400, f"kind muss {KIND_V1} sein")
|
||||
|
||||
Reference in new issue
Block a user