📝 Tournament Registration

🔗 1. Register for a Tournament

Endpoint: POST /api/v1/registration/register-tournament

⚠️ Note: Requires userId to be injected via @RequestAttribute (e.g., from an authentication filter or middleware)

Request Body:

[
  {
    "userId": "e214b123-aaaa-bbbb-cccc-ddddeeee1234",
    "tournamentId": "e3021b55-93b5-4f33-b7b3-b1a95d2d9a66"
  }
]

Response (200 OK):

{
  "message": "registration successfull"
}

Response (200 OK): (if same user try to register)

{
  "message": "User already registered"
}

Error (401 Unauthorized):

{
  "message": "You cannot register on behalf of another user."
	} 

📄 2. Get All Registrations

Endpoint: GET /api/v1/registration

Response (200 OK):

[
  {
    "id": "08d3b9b3-97bb-4f2e-9dcd-ae847a57fc7c",
    "userId": "e214b123-aaaa-bbbb-cccc-ddddeeee1234",
    "tournamentId": "e3021b55-93b5-4f33-b7b3-b1a95d2d9a66"
  },
   {
    "id": "08d9Y7b3-97bb-4f2e-9dcd-ae847a57fc7c",
    "userId": "e214b123-dddd-eeee-hdhh-ddddeeee1235",
    "tournamentId": "e23Pob55-93b5-4f33-b7b3-b1a95d299uid"
  }
]

📝 3. User Registration

Endpoint: POST /api/v1/auth/signup

Request Body:

{
  "email": "[email protected]",
  "password": "securePassword",
  "username": "username"
}