AltCamp / altcampv1-backend

AltCamp is an e-learning platform that allows students to post messages to the discussion threads, interact and receive feedback from other students and instructors, and hence create a deeper understanding of the subject matter being discussed.
https://altcamp.onrender.com
MIT License
13 stars 17 forks source link

[Feature]: Implement bulk action on Bookmarks(bulk delete bookmarks) #219

Closed Boye95 closed 1 year ago

Boye95 commented 1 year ago

Contact Details

No response

The Problem

Users who bookmark contents on the platform can only delete/remove bookmarks one at a time. It becomes stressful when the user wants to delete/remove multiple bookmarks simultaneously.

How to Fix It

The API should have a deleteMultipleBookmarks endpoint that will take ids of the bookmarks that the user wants to delete/remove as part of the request body in an array and deletes those bookmarks simultaneously.

A sample request from the frontend using RTK-Query

deleteBookmark: builder.mutation({
      query: () => ({
        url: '/deleteMultipleBookmarks,
        method: 'DELETE',
        body: {
            ids: ['1234', '35433', '98765']
       }
      }), 
}),

Additional Context

No response

Specific File Path(s) on the Repo to be Modified/Refered to

No response

Code of Conduct

tobisupreme commented 1 year ago

Thanks. We can expose an API that will accept an array of bookmark IDs. I can work on this