Ability to delete a resource ๐ฎ
Opened this issue ยท 12 comments
Description
Currently, a member can add/edit a resource that they posted but can't delete it. It may be the case that a member wants to delete a resource because it's outdated or for another reason.
Acceptance Criteria
UX
There is an icon button that lives on the resource card which is used to copy a share-able URL to the resource. We should update that to a "more options" icon button that display a dropdown with the following options:
- "Copy URL"
- "Delete Resource"
Upon clicking "Delete Resource", it should take the member to a new URL (ie: /resources/:id/delete
) which shows a confirmation modal to delete the resource. Please ensure that any search params in the URL are preserved when navigating to the /resources/:id/delete
URL. Once the user confirms they want to delete the resource, it should be removed from the database.
Backend
Upon the resource being deleted, it should also:
- Delete any
resource_views
,resource_upvotes
,resource_attachments
associated with the resource. It would be easiest to update theresources
table to cascade deletes. - If there was any
resource_attachments
, it should also remove those attachments from our cloud storage. You'll need to implement a new function such asdeleteObject
in our object-storage infrastructure.
I am interested in working on this issue!
Awesome - it's yours @nyccreator!
Hey @nyccreator, are you still working on this issue? No worries if not, just let me know so we can open it up for someone else!
Hey @tomas-salgado, I've gotten sidetracked due to my internship, but would still like to complete this issue, so I'll provide an update by the end of the week. Thanks for your patience!
Going to open up this issue!
@Capn05 I just need you to comment on this issue so that I can assign it to you!
If I can, I'd like to work on this!
sorry y'all, This is my comment for assignment if it's not too late
Going to assign this to @Capn05 but we will be having more issues open up soon!
@Capn05 are you still working on this? All good if not, I'll just open up the issue
I would love to pick this up ๐