fox
This commit is contained in:
parent
d36ea7a62d
commit
150916879f
4
main.py
4
main.py
@ -69,10 +69,10 @@ async def startup_event():
|
||||
|
||||
@app.get('/find/{title}')
|
||||
def titles(title: str):
|
||||
response = {}
|
||||
response = []
|
||||
for index, row in data.iterrows():
|
||||
if title.lower() in row['title'].lower():
|
||||
response[index] = {'title': row['title'], 'year': row['release_year']}
|
||||
response.append({'id': index, 'title': row['title'], 'year': row['release_year']})
|
||||
return response
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user