mirror of
https://github.com/hubHarmony/servii-backend.git
synced 2024-11-17 21:40:31 +00:00
[-] Removed var narrowing (from the main scope)
This commit is contained in:
parent
a5ab9a0caa
commit
4daf2ed654
6
app.py
6
app.py
@ -72,7 +72,7 @@ def authenticate_request(data: dict):
|
|||||||
|
|
||||||
|
|
||||||
def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]:
|
def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]:
|
||||||
args = []
|
fn_args = []
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
if not data:
|
if not data:
|
||||||
raise Exception("Empty request body.")
|
raise Exception("Empty request body.")
|
||||||
@ -82,8 +82,8 @@ def parse_and_validate_request(parameters: list[str]) -> Union[list[str], None]:
|
|||||||
if name not in data:
|
if name not in data:
|
||||||
raise Exception(f"Missing parameter {name}")
|
raise Exception(f"Missing parameter {name}")
|
||||||
value = data[name]
|
value = data[name]
|
||||||
args.append(value)
|
fn_args.append(value)
|
||||||
return args
|
return fn_args
|
||||||
|
|
||||||
|
|
||||||
route_handlers = {
|
route_handlers = {
|
||||||
|
Loading…
Reference in New Issue
Block a user