<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\CompetitionController;
use App\Http\Controllers\TournamentController;

Route::get('/user', function (Request $request) {
    return $request->user();
})->middleware('auth:api');

Route::get('/competitions/public', [CompetitionController::class, 'getPublicCompetitions']);

Route::get('/competitions/user', [CompetitionController::class, 'getUserCompetitions'])->middleware('auth:api');

Route::post('/tournaments/{tournament}/addTeam', [TournamentController::class, 'addTeam'])->middleware(['auth', 'verified'])->name('tournaments.addTeam');
