Update web

pull/1/head
hikari.ftg 2022-03-23 13:11:05 +00:00
parent 0112296998
commit 42d62c5b20
2 changed files with 0 additions and 11 deletions

View File

@ -31,7 +31,6 @@ from .. import utils
class Web:
def __init__(self, **kwargs):
self.heroku_api_token = os.environ.get("heroku_api_token")
self.api_token = kwargs.pop("api_token")
self.data_root = kwargs.pop("data_root")
self.connection = kwargs.pop("connection")
@ -66,7 +65,6 @@ class Web:
return {
"api_done": self.api_token is not None,
"tg_done": bool(self.client_data),
"heroku_token": self.heroku_api_token,
"hosting": self.hosting,
"default_app": self.default_app,
}
@ -161,12 +159,5 @@ class Web:
async def finish_login(self, request):
if not self.clients:
return web.Response(status=400)
text = await request.text()
if text:
if not re.fullmatch(r"[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}", text):
return web.Response(status=400)
self.heroku_api_token = text
else:
self.heroku_api_token = None
self.clients_set.set()
return web.Response()

View File

@ -203,7 +203,6 @@
} else {
return fetch("/finishLogin", {
method: "POST",
body: heroku_token,
credentials: "include"
})
.then(function(response) {
@ -273,7 +272,6 @@
} else {
fetch("/finishLogin", {
method: "POST",
body: '',
credentials: "include"
})
.then(function(response) {