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

Implement Delete Event Functionality with Admin Restriction on Event/[id] Page #125

Open
Anas-github-acc opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels
contribute-a-thon Issues for contribute-a-thon hacktoberfest

Comments

@Anas-github-acc
Copy link
Collaborator

Description
The event/[id] page has a 'delete' button for removing an event, but it is currently non-functional. This task involves implementing the delete functionality so that only an admin can delete an event. The delete request should call the api/v1/delete/event endpoint with the correct event id as search params (i.e., ?id= )

Tasks

  • Update the Delete button to trigger an API call to api/v1/delete/event.
  • Pass the correct event id as a search params in the API request.
  • Add validation to ensure that only an admin can delete the event.
  • Display a confirmation prompt to confirm the deletion before proceeding.
  • Implement error handling to manage cases where the user is not authorized to delete the event.

Acceptance Criteria

  • Only admin users can delete an event on the event/[id] page.
  • A confirmation prompt appears before deletion is finalized.
  • Proper error messages display when unauthorized users attempt to delete an event.
  • The delete functionality calls api/v1/delete/event?id='' where id should be correct event id and handles responses properly.
@Anas-github-acc Anas-github-acc added contribute-a-thon Issues for contribute-a-thon hacktoberfest labels Oct 29, 2024
@deveshsawant05
Copy link

Assign me this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribute-a-thon Issues for contribute-a-thon hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants