feat: expand platform APIs, sources, and test coverage
Some checks failed
CI/CD Pipeline / Run Tests (pull_request) Successful in 1m53s
CI/CD Pipeline / Telegram Notify Success (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m54s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
Some checks failed
CI/CD Pipeline / Run Tests (pull_request) Successful in 1m53s
CI/CD Pipeline / Telegram Notify Success (push) Has been cancelled
CI/CD Pipeline / Run Tests (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (push) Has been cancelled
CI/CD Pipeline / Code Quality Checks (pull_request) Failing after 2m54s
CI/CD Pipeline / Telegram Notify Success (pull_request) Has been skipped
This commit is contained in:
@@ -42,7 +42,9 @@ class ExchangeConnectionListCreateView(APIView):
|
||||
},
|
||||
)
|
||||
def get(self, request):
|
||||
queryset = ExchangeConnection.objects.all().order_by("-is_active", "-created_at")
|
||||
queryset = ExchangeConnection.objects.all().order_by(
|
||||
"-is_active", "-created_at"
|
||||
)
|
||||
serializer = ExchangeConnectionSerializer(queryset, many=True)
|
||||
return api_response(serializer.data, status_code=status.HTTP_200_OK)
|
||||
|
||||
@@ -122,7 +124,9 @@ class ExchangeCopyDataView(APIView):
|
||||
task = copy_parsers_data_async.delay(
|
||||
connection_id=active_connection.id,
|
||||
payload=serializer.validated_data,
|
||||
requested_by_id=request.user.id if request.user.is_authenticated else None,
|
||||
requested_by_id=request.user.id
|
||||
if request.user.is_authenticated
|
||||
else None,
|
||||
)
|
||||
|
||||
# Предсоздаём запись для мгновенного отслеживания в /api/v1/jobs/{task_id}/
|
||||
@@ -151,7 +155,9 @@ class ExchangeCopyDataView(APIView):
|
||||
"task_id": task.id,
|
||||
"connection_id": active_connection.id,
|
||||
"mode": serializer.validated_data["mode"],
|
||||
"truncate_before_copy": serializer.validated_data["truncate_before_copy"],
|
||||
"truncate_before_copy": serializer.validated_data[
|
||||
"truncate_before_copy"
|
||||
],
|
||||
},
|
||||
status_code=status.HTTP_202_ACCEPTED,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user