mirror of
https://github.com/dnslin/aria2bot.git
synced 2026-01-11 20:12:20 +08:00
feat(auth): 添加 Bot 用户白名单功能及权限校验机制
This commit is contained in:
@@ -45,7 +45,7 @@ def create_app(config: BotConfig) -> Application:
|
||||
builder = builder.base_url(config.api_base_url).base_file_url(config.api_base_url + "/file")
|
||||
app = builder.build()
|
||||
|
||||
api = Aria2BotAPI(config.aria2)
|
||||
api = Aria2BotAPI(config.aria2, config.allowed_users)
|
||||
for handler in build_handlers(api):
|
||||
app.add_handler(handler)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user