Add production Docker setup and update backend/frontend configs
Introduces .dockerignore, production Dockerfile and nginx config for frontend, and refactors docker-compose.yml for multi-service deployment. Updates backend and frontend code to support public API tagging, improves refund handling, adds test email endpoint, and migrates Orval config to TypeScript. Removes unused frontend Dockerfile and updates dependencies for React Query and Orval.
This commit is contained in:
@@ -5,7 +5,11 @@ from rest_framework.response import Response
|
||||
from drf_spectacular.utils import extend_schema, OpenApiParameter
|
||||
from rest_framework.permissions import AllowAny
|
||||
|
||||
from account.tasks import send_email_test_task
|
||||
|
||||
@extend_schema(
|
||||
tags=["public"],
|
||||
|
||||
description="Vrátí všechny možné hodnoty pro ChoiceField s podporou vícejazyčných labelů. "
|
||||
"Umožňuje načíst více modelů a polí najednou.",
|
||||
parameters=[
|
||||
@@ -83,3 +87,24 @@ def choices(request):
|
||||
result[f"{model_name}.{field_name}"] = choices_data
|
||||
|
||||
return Response(result)
|
||||
|
||||
|
||||
|
||||
@extend_schema(
|
||||
tags=["Testing"],
|
||||
description="Testovací endpoint pro odeslání testovacího emailu.",
|
||||
parameters=[
|
||||
OpenApiParameter(
|
||||
name="email",
|
||||
description="Emailová adresa příjemce testovacího emailu.",
|
||||
required=True,
|
||||
type=str,
|
||||
),
|
||||
],
|
||||
)
|
||||
@api_view(["GET"])
|
||||
def test_email(request):
|
||||
email = request.query_params.get("email")
|
||||
send_email_test_task.delay(email)
|
||||
|
||||
return Response({"status": "Test task (celery) email sent, await delivery."})
|
||||
Reference in New Issue
Block a user