diff --git a/server/api/accounts.py b/server/api/accounts.py index f8432bf..8d864d6 100644 --- a/server/api/accounts.py +++ b/server/api/accounts.py @@ -1,11 +1,12 @@ # -*- coding: utf-8 -*- """ BOSS 账号 API(需要登录): -- POST /api/accounts -> 添加账号(绑定环境名称到电脑) -- GET /api/accounts -> 查询所有账号(含电脑名称、在线、任务状态) -- POST /api/accounts/fill-boss-ids -> 批量填充缺失的 boss_id(触发 check_login) -- GET /api/accounts/{id} -> 查询单个账号详情 -- DELETE /api/accounts/{id} -> 删除账号 +- POST /api/accounts -> 添加账号(绑定环境名称到电脑) +- GET /api/accounts -> 查询所有账号(含电脑名称、在线、任务状态) +- POST /api/accounts/fill-boss-ids -> 批量填充缺失的 boss_id(触发 check_login) +- GET /api/accounts/{id} -> 查询单个账号详情(按账号主键 ID) +- DELETE /api/accounts/{id} -> 删除账号 +- GET /api/accounts/worker/{worker_id} -> 查询某个 Worker 的所有账号 检测登录等操作统一通过 POST /api/tasks 提交,task_type 传 check_login 即可。 """ diff --git a/server/urls.py b/server/urls.py index ac27557..5368477 100644 --- a/server/urls.py +++ b/server/urls.py @@ -27,8 +27,8 @@ urlpatterns = [ # ─── 账号 ─── path("api/accounts", accounts.account_list), path("api/accounts/fill-boss-ids", accounts.fill_boss_ids), + path("api/accounts/worker/", accounts.account_list_by_worker), path("api/accounts/", accounts.account_detail), - path("api/accounts/", accounts.account_list_by_worker), # ─── 筛选配置 ─── path("api/filters", filters.filter_list),