Skip to content

Prevent updating tournament start date to a past date in UpdateTournament mutation #27

@Dejmenek

Description

@Dejmenek

Problem

When updating a tournament via the UpdateTournament mutation, it is currently possible to change the start date to a date in the past (relative to now). This should not be allowed, as tournaments should only have start dates that are present or future-oriented.

Solution

  • Add server-side validation to the UpdateTournament mutation.
  • Prevent start date from being changed to any date that is in the past at the time of the mutation request.

Tasks

  • Implement validation logic in UpdateTournament mutation.
  • Update error messaging to inform the user if a past date is provided.
  • Add test cases to ensure this validation works as intended (both positive and negative scenarios).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions