pydantic docstrings
This commit is contained in:
@ -82,6 +82,7 @@ class LyricSearch(FastAPI):
|
||||
async def artist_typeahead_handler(self, data: ValidTypeAheadRequest) -> JSONResponse:
|
||||
"""
|
||||
Artist Type Ahead Handler
|
||||
- **query**: The query
|
||||
"""
|
||||
if not isinstance(data.query, str) or len(data.query) < 2:
|
||||
return JSONResponse(status_code=500, content={
|
||||
@ -96,6 +97,8 @@ class LyricSearch(FastAPI):
|
||||
async def song_typeahead_handler(self, data: ValidTypeAheadRequest) -> JSONResponse:
|
||||
"""
|
||||
Song Type Ahead Handler
|
||||
- **query**: The query
|
||||
- **pre_query**: The pre-query (artist)
|
||||
"""
|
||||
if not isinstance(data.pre_query, str)\
|
||||
or not isinstance(data.query, str):
|
||||
|
Reference in New Issue
Block a user