49 lines
1.5 KiB
Python
49 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
Django URL 路由配置。
|
|
"""
|
|
from django.urls import path
|
|
|
|
from server.api import auth, accounts, tasks, workers, filters, scripts, contacts, stats, settings
|
|
|
|
urlpatterns = [
|
|
# ─── 健康检查 ───
|
|
path("health", workers.health_check),
|
|
|
|
# ─── 认证 ───
|
|
path("api/auth/login", auth.login),
|
|
|
|
# ─── Worker ───
|
|
path("api/workers", workers.worker_list),
|
|
path("api/workers/<str:worker_id>", workers.worker_detail),
|
|
|
|
# ─── 任务 ───
|
|
path("api/tasks", tasks.task_list),
|
|
path("api/tasks/<str:task_id>", tasks.task_detail),
|
|
|
|
# ─── 账号 ───
|
|
path("api/accounts", accounts.account_list),
|
|
path("api/accounts/<int:account_id>", accounts.account_detail),
|
|
|
|
# ─── 筛选配置 ───
|
|
path("api/filters", filters.filter_list),
|
|
path("api/filters/<int:pk>", filters.filter_detail),
|
|
|
|
# ─── 话术管理 ───
|
|
path("api/scripts", scripts.script_list),
|
|
path("api/scripts/<int:pk>", scripts.script_detail),
|
|
|
|
# ─── 联系记录 ───
|
|
path("api/contacts", contacts.contact_list),
|
|
path("api/contacts/query", contacts.contact_query),
|
|
path("api/contacts/<int:pk>", contacts.contact_detail),
|
|
|
|
# ─── 统计分析 ───
|
|
path("api/stats", stats.stats_overview),
|
|
path("api/stats/daily", stats.stats_daily),
|
|
|
|
# ─── 系统配置 ───
|
|
path("api/settings", settings.settings_list),
|
|
path("api/settings/<str:key>", settings.settings_detail),
|
|
]
|