feat(registry): add new endpoints for registers, exchange, and backups; update routing and configurations
Some checks failed
CI/CD Pipeline / Code Quality Checks (push) Failing after 3m10s
CI/CD Pipeline / Run Tests (push) Successful in 3m35s
CI/CD Pipeline / Telegram Notify Success (push) Has been skipped
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m26s
CI/CD Pipeline / Run Tests (pull_request) Successful in 2m46s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped

This commit is contained in:
2026-03-04 15:36:57 +01:00
parent 052389d921
commit a91ed1f1ae
90 changed files with 5488 additions and 622 deletions

View File

@@ -17,6 +17,7 @@ from django.conf import settings
from django.db import connection
from drf_yasg.utils import swagger_auto_schema
from rest_framework import status
from rest_framework.exceptions import ValidationError
from rest_framework.permissions import AllowAny
from rest_framework.request import Request
from rest_framework.response import Response
@@ -270,7 +271,14 @@ class BackgroundJobListView(APIView):
from apps.core.services import BackgroundJobService
status_filter = request.query_params.get("status")
limit = min(int(request.query_params.get("limit", 50)), 100)
limit_raw = request.query_params.get("limit", "50")
try:
limit = int(limit_raw)
except (TypeError, ValueError) as exc:
raise ValidationError({"limit": "Параметр limit должен быть целым числом"}) from exc
if limit < 1:
raise ValidationError({"limit": "Параметр limit должен быть больше 0"})
limit = min(limit, 100)
jobs = BackgroundJobService.get_user_jobs(
user_id=request.user.id,