Commit 9aa122a9e73afff8ef04c8dbbdddc81acc75e557

Authored by Rohan Rangray
1 parent 8c3e42b893
Exists in master

Fixed F3

Showing 1 changed file with 7 additions and 2 deletions Side-by-side Diff

DesignUseCases.tex View file @ 9aa122a
... ... @@ -930,8 +930,13 @@
930 930 {The frontend shall generate a POST request in FlashcardFactory.js and send it to
931 931 /api/flashcards/\textless{}flashcard id\textgreater{}/pull}
932 932 \item
933   - {The server shall create a UserFlashcard object to represent that the
934   - user's deck contains the card.}
  933 + {The server shall call the FlashcardViewSet.pull to handle the POST request sent by the frontend.}
  934 +\item
  935 + {The FlashcardViewSet.pull method should call the user.pull method in models.py with the flashcard object
  936 + to be pulled as an argument}
  937 +\item
  938 + {The user.pull method shall create a UserFlashcard object associated with the request's user and the
  939 + passed in flashcard object and save it in the database.}
935 940 \item
936 941 {The server shall notify connected clients about the new card rating,
937 942 if any}