Files
octopus/myproject/integrations/urls.py
Andrey Smakotin 37394121e1 feat(integrations): архитектура включения/выключения интеграций
- Удалена лишняя модель IntegrationConfig из system_settings
- Singleton-паттерн: одна запись на интеграцию с is_active тумблером
- Добавлено шифрование токенов (EncryptedCharField с Fernet AES-128)
- UI: тумблеры слева, форма настроек справа
- API endpoints: toggle, settings, form_data
- Модель Recommerce: store_url + api_token (x-auth-token)
- Модель WooCommerce: store_url + consumer_key/secret

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 00:29:04 +03:00

24 lines
876 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from django.urls import path
from .views import (
IntegrationsListView,
toggle_integration,
save_integration_settings,
get_integration_form_data,
)
app_name = 'integrations'
urlpatterns = [
# Страница со списком интеграций
path("", IntegrationsListView.as_view(), name="list"),
# API endpoints для управления интеграциями
path("toggle/<str:integration_id>/", toggle_integration, name="toggle"),
path("settings/<str:integration_id>/", save_integration_settings, name="settings"),
path("form/<str:integration_id>/", get_integration_form_data, name="form_data"),
# TODO: добавить когда понадобится
# path("test/<str:integration_id>/", test_connection, name="test_connection"),
# path("webhook/<str:integration_type>/", webhook, name="webhook"),
]