Skip to content

Commit

Permalink
feat: return debug-useful response from endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ashultz0 committed Oct 25, 2023
1 parent 4a09142 commit 227d8f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flashcards/apps/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
@require_http_methods(['GET'])
def cards(request, course_id, block_id):
cards = anki_from_block_id(course_id, block_id)
return Response("cards")
return Response(cards)

Check warning on line 12 in flashcards/apps/api/v1/views.py

View check run for this annotation

Codecov / codecov/patch

flashcards/apps/api/v1/views.py#L12

Added line #L12 was not covered by tests
1 change: 1 addition & 0 deletions flashcards/apps/cards/anki.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,5 @@ def anki_from_block_id(course_id, block_id):
csv_maybe = cards_from_block_id(course_id, block_id)
result = csv_maybe.replace('\t', '')
create_anki_cards(result)
return csv_maybe # return the CSV text so we can see it in testing

0 comments on commit 227d8f7

Please sign in to comment.