Skip to content

Conversation

@Muhindo-Galien
Copy link

This PR introduces three additional advanced functions to enhance this canister'sfunctionality.

Transfer Ticket Ownership

The transferTicketOwnership function allows users to transfer ownership of a ticket from one user to another. It takes the following parameters:

  • ticketId: The ID of the ticket to be transferred.
  • currentHolderId: The ID of the current ticket holder.
  • newHolderId: The ID of the new ticket holder.
  • password: The password of the current ticket holder for authentication.

Example usage:

transferTicketOwnership({
  ticketId: 'abc123',
  currentHolderId: 'user1',
  newHolderId: 'user2',
  password: 'password123',
});

Refund Ticket

The refundTicket function allows ticket holders to request a refund for their ticket. It takes the following parameters:

  • ticketId: The ID of the ticket to be refunded.
  • password: The password of the ticket holder for authentication.
    Example usage:
refundTicket({
  ticketId: 'abc123',
  password: 'password123',
});

Event Search

The searchEvents function enables users to search for events based on various criteria. It takes the following parameters (all optional):

  • eventName: The name of the event.
  • organizer: The organizer of the event.
  • date: The date of the event.
  • location: The location of the event.

Example usage:

searchEvents({
  eventName: 'concert',
  organizer: 'John Doe',
  date: '2023-08-15',
  location: 'New York',
});

Please refer to the function descriptions and examples above for a high-level understanding of their usage within the Ticket Management System.

Copy link
Owner

@dev-opus dev-opus left a comment

Choose a reason for hiding this comment

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

The searchEvents function would break the code. an event does not have date and location fields. Please remove those fields.

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.

2 participants