Commit 52456014 authored by 水濑真白's avatar 水濑真白

fix: await VIP auth checks

parent 325471e6
Pipeline #43292 failed with stages
in 95 minutes and 13 seconds
......@@ -4331,7 +4331,7 @@ if true
response.end(addCallback(u.query.callback, duellog))
else if u.pathname == '/api/getkeys' and settings.modules.vip.enabled
if !auth.auth(u.query.username, u.query.pass, "vip", "get_keys")
if !await auth.auth(u.query.username, u.query.pass, "vip", "get_keys")
response.writeHead(200)
response.end(addCallback(u.query.callback, "Unauthorized."))
return
......@@ -4557,7 +4557,7 @@ if true
else if u.query.generatekey and settings.modules.vip.enabled
if !auth.auth(u.query.username, u.query.pass, "vip", "generate_keys")
if !await auth.auth(u.query.username, u.query.pass, "vip", "generate_keys")
response.writeHead(200)
response.end(addCallback(u.query.callback, "['密码错误', 0]"))
return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment