Skip to content

Commit

Permalink
Merge pull request #15 from imnasnainaec/lib-langfontfinder-apy-py-pa…
Browse files Browse the repository at this point in the history
…th-default

In api.py, remove default argument from Path() as Path() arguments are always required
  • Loading branch information
tim-eves authored Apr 30, 2024
2 parents f81d853 + 32fa66d commit 8394aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/langfontfinder/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@


@lffapp.get("/lang/{ltag}", summary="lang/{ltag}", name="lang")
async def lang(response: Response, ltag: str = Path("", description="Language tag")):
async def lang(response: Response, ltag: str = Path(description="Language tag")):
""" Given a language tag, returns font location information as json object. """
res = ruleset.get(ltag)
if res is None:
response.status_code = 404
return res

@lffapp.get("/family/{familyid}", summary="family/{familyid}", name="family")
async def family(response:Response, familyid: str = Path("", description="Font family id")):
async def family(response:Response, familyid: str = Path(description="Font family id")):
""" Given a familyid returns the font family json object. """
res = ruleset.getfamily(familyid)
if res is None:
Expand Down

0 comments on commit 8394aa3

Please sign in to comment.