Skip to content

Refactor post views and test #93

@fflorent-01

Description

@fflorent-01

Make sure the view functions in backend/api/views/post_views.py are converted to DRF. And integrated to what's been done so far in auth_views.py.

  • Caching is integrated for all post requests

  • Media handling is integrated for all post requests

  • Post related models are handled for all post requests

  • create_post is integrated => POST a single post

    • Hashtag get created if needed
    • File upload is working
    • Add following notification based on preferences
  • edit_post is integrated => PUT a single post

    • Hashtag get created/deleted if needed
    • File upload is working
    • Add following notification based on preferences
  • delete_post is integrated => DELETE a single post

    • Related orphan files get deleted
    • Related orphan hashtag get deleted
    • Related following notification gets deleted
  • get_user_posts is integrated => GET all post from a specified user

    • Must support limit argument
  • get_single_post is integrated => GET a single post from post_id

  • get_multiple_posts is integrated => GET posts from specified list of post_id

  • get_global_newsfeed => GET posts from specified post_type

    • Handles limit
  • get_newsfeed => GET posts from following, hashtags, limit

  • add_post_bookmark => POST a bookmark relative to a specified post_id

  • delete_post_bookmark => DELETE a bookmark relative to a specified post_id

  • get_bookmarked_posts => GET list of all bookmarked post

Metadata

Metadata

Assignees

Labels

backendbackend specific issuespriority: highNeeds to be done before other lower priority tasks.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions