forked from Alexey/DAS_2024_1
tot
This commit is contained in:
parent
8b96102dbd
commit
0f898b968d
@ -80,13 +80,16 @@ def get_all():
|
|||||||
return list_jsonify(), 200
|
return list_jsonify(), 200
|
||||||
|
|
||||||
|
|
||||||
# @app.route('/', methods=['GET'])
|
@app.route('/full', methods=['GET'])
|
||||||
# def get_all_full():
|
def get_all_full():
|
||||||
# response = []
|
authors: list[dict] = requests.get(authors_url).json()
|
||||||
# for book in books:
|
response = []
|
||||||
# response.append(requests.get(authors_url + str(book.author_id)).json())
|
for book in books:
|
||||||
#
|
for author in authors:
|
||||||
# return list_jsonify(), 200
|
if book.author_id == uuid.UUID(author.get('uuid')):
|
||||||
|
response.append(book.to_dict_with_info(author))
|
||||||
|
|
||||||
|
return response, 200
|
||||||
|
|
||||||
|
|
||||||
@app.route('/by-author/<uuid:author_uuid>', methods=['GET'])
|
@app.route('/by-author/<uuid:author_uuid>', methods=['GET'])
|
||||||
|
Loading…
Reference in New Issue
Block a user