fix: add verbs to fn attributes

This commit is contained in:
julius 2023-11-23 13:53:51 +01:00
parent 67d6e4322f
commit ae61dfd7c5
Signed by untrusted user who does not match committer: julius
GPG Key ID: 8AA3791362A8084A

View File

@ -46,7 +46,9 @@ def random_char():
@app.get("/phrases/", response_model=list[str])
def phrases(n: int = 4, nouns: int = 1, adjs: int = 2, pw: bool = False):
def phrases(
n: int = 4, verbs: int = 1, adjs: int = 1, nouns: int = 1, pw: bool = False
):
n, nouns, adjs = map(abs, [n, nouns, adjs])
verbs = verbs if verbs <= 4 else 4
adjs = adjs if adjs <= 4 else 4