diff --git a/DesignUseCases.tex b/DesignUseCases.tex index f2ed604..47dfbd2 100644 --- a/DesignUseCases.tex +++ b/DesignUseCases.tex @@ -930,8 +930,13 @@ Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashard} {The frontend shall generate a POST request in FlashcardFactory.js and send it to /api/flashcards/\textless{}flashcard id\textgreater{}/pull} \item - {The server shall create a UserFlashcard object to represent that the - user's deck contains the card.} + {The server shall call the FlashcardViewSet.pull to handle the POST request sent by the frontend.} +\item + {The FlashcardViewSet.pull method should call the user.pull method in models.py with the flashcard object + to be pulled as an argument} +\item + {The user.pull method shall create a UserFlashcard object associated with the request's user and the + passed in flashcard object and save it in the database.} \item {The server shall notify connected clients about the new card rating, if any}