Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17 delete public posts #67

Merged
merged 10 commits into from
Oct 26, 2023
Merged

17 delete public posts #67

merged 10 commits into from
Oct 26, 2023

Conversation

Boredalien248
Copy link
Contributor

  • changed all default placeholder url's to use getAuthorId
  • fixed bug if posts is empty
  • implemented delete feature
  • only allows user to delete public posts and if the post belongs to them

TESTING:
signup with a new user go to profile and check if the name is the same one you chose
in order to check if the delete button is appearing only for PUBLIC posts. head over to DJANGO ADMIN and set one of your posts to private and refresh the page the delete button should dissapear for selected post

React.App.-.Google.Chrome.2023-10-25.00-30-58.mp4

Copy link
Contributor

@mehsheed mehsheed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed some import errors.
Great job @Boredalien248

Everything seems to be working but @kaynzhel should take a look as she was following up with you

server/socialdistribution/views.py Outdated Show resolved Hide resolved
server/socialdistribution/views.py Outdated Show resolved Hide resolved
client/src/components/feed/HomePage.tsx Outdated Show resolved Hide resolved
client/src/components/post/PostsList.tsx Show resolved Hide resolved
client/src/components/feed/HomePage.tsx Outdated Show resolved Hide resolved
client/src/components/Profilepage/ProfilePage.tsx Outdated Show resolved Hide resolved
@Boredalien248
Copy link
Contributor Author

  • made a small change to test_put_create_post_given_id in test_post_view to check for {uri}socialdistribution/author/{self.author.id}/posts/{post_id} instead of {uri}author/{self.author.id}/posts/{post_id}
  • added and edited the files as recommended by @kaynzhel

Copy link
Contributor

@kaynzhel kaynzhel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-tested and functionality looks good, just a few more on the view

server/socialdistribution/views.py Outdated Show resolved Hide resolved
server/socialdistribution/views.py Outdated Show resolved Hide resolved
@Boredalien248 Boredalien248 merged commit 860bad6 into main Oct 26, 2023
@Boredalien248 Boredalien248 deleted the 17-delete-public-posts branch October 26, 2023 21:32
@kaynzhel kaynzhel linked an issue Oct 29, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

As an author, I want to delete my own public posts.
3 participants