From 84131d3c5072bbbe4a95a9a712b78d29c7b7c5a7 Mon Sep 17 00:00:00 2001 From: timofey Date: Fri, 31 Mar 2023 11:28:01 +0000 Subject: [PATCH] configurable redirect --- app/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index e63257a..5070ff3 100644 --- a/app/main.py +++ b/app/main.py @@ -61,7 +61,11 @@ class Context: raise RuntimeError("secret not set") def redirect(self) -> str: - return "https://music.parrrate.ru/auth/" + match self.config("redirect"): + case str() as result: + return result + case _: + raise RuntimeError("redirect not set") def ready(self) -> bool: match self.config("ready", False):