ClaraPrioux / u09---MemoLang

0 stars 0 forks source link

Add a word functionnallity #11

Closed ClaraPrioux closed 1 month ago

ClaraPrioux commented 2 months ago
ClaraPrioux commented 1 month ago

Steps when user type a word

  1. Type a word
  2. Search word in db
  3. Take the translation of this word (both ways: if swedish or english word typed)
  4. Take the user_id of the user who typed the word (jwt)
  5. Save in users_words: user_id + eng_word + swe_word + context
  6. Return message "Word saved"

Steps to follow to create this functionality

  1. Create a users_words model ✅
  2. Create an endpoint to handle word input /add, logic should contain:
    • handle the word and token to extract user_id (miss-spelled functionality?)
    • search in db
    • handle bidirectional translation
    • Save to users_words collection
    • Return a confirmation message
ClaraPrioux commented 1 month ago

18th Sept.

=> GOALS for tomorrow: