账号导入--可以直接打标签
This commit is contained in:
@@ -186,8 +186,11 @@ def import_accounts(
|
||||
db: Session = Depends(get_db),
|
||||
current: User = Depends(require_permission("account:import")),
|
||||
):
|
||||
"""批量导入账号。格式:用户名|密码|邮箱|邮箱密码|标签(可选)"""
|
||||
accounts, skipped = parse_and_build_accounts(req.text)
|
||||
"""批量导入账号。格式:用户名|密码|邮箱|邮箱密码|标签(可选)
|
||||
|
||||
req.tag 为统一标签兜底:某行未单独写标签时使用该值,行内标签优先。
|
||||
"""
|
||||
accounts, skipped = parse_and_build_accounts(req.text, req.tag)
|
||||
|
||||
if accounts:
|
||||
db.add_all(accounts)
|
||||
|
||||
Reference in New Issue
Block a user