This commit is contained in:
AF 2021-12-22 19:37:32 +03:00
parent 0e6d58201e
commit b161c4c88c
2 changed files with 3 additions and 1 deletions

View File

@ -33,6 +33,7 @@ class V6D0AuthAppFactory(AppFactory):
assert hnonce == nonce.hex()
approved = self.cdb.approve(bytes.fromhex(hhandle))
await ws.send_bytes(approved)
await ws.close()
@routes.get('/approve')
async def approve(request: web.Request):
@ -96,6 +97,7 @@ class V6D0AuthAppFactory(AppFactory):
assert hnonce == nonce.hex()
self.cdb.remove_role(Role(VerifyKey(bytes.fromhex(hrequester)), role))
await ws.send_bytes(b'0')
await ws.close()
@routes.get('/remove_role')
async def remove_role(request: web.Request):

View File

@ -29,7 +29,7 @@ class AbstractRequest:
self.future: asyncio.Future[bytes] = self._loop.create_future()
def __le__(self, other):
if isinstance(other, SignatureRequest):
if isinstance(other, AbstractRequest):
return self.timeout < other.timeout
else:
return NotImplemented