Add web handler decorators

This commit is contained in:
Tulir Asokan 2019-05-14 18:32:48 +03:00
parent 304c1b5536
commit 9bd06a3d64
7 changed files with 91 additions and 16 deletions

View file

@ -26,7 +26,7 @@ bcrypt_regex = re.compile(r"^\$2[ayb]\$.{56}$")
class Config(BaseFileConfig):
@staticmethod
def _new_token() -> str:
return "".join(random.choice(string.ascii_lowercase + string.digits) for _ in range(64))
return "".join(random.choices(string.ascii_lowercase + string.digits, k=64))
def do_update(self, helper: ConfigUpdateHelper) -> None:
base = helper.base