]> git.localhorst.tv Git - alttp.git/blob - routes/api.php
ad624c3e60f2d964e76bbb3a3b6c6ef038a8478a
[alttp.git] / routes / api.php
1 <?php
2
3 use Illuminate\Http\Request;
4 use Illuminate\Support\Facades\Route;
5
6 /*
7 |--------------------------------------------------------------------------
8 | API Routes
9 |--------------------------------------------------------------------------
10 |
11 | Here is where you can register API routes for your application. These
12 | routes are loaded by the RouteServiceProvider within a group which
13 | is assigned the "api" middleware group. Enjoy building your API!
14 |
15 */
16
17 Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
18         return $request->user();
19 });
20
21 Route::get('alttp-seed/{hash}', 'App\Http\Controllers\AlttpSeedController@byHash');
22 Route::post('alttp-seed/{hash}/retry', 'App\Http\Controllers\AlttpSeedController@retry');
23
24 Route::post('aos-generate', 'App\Http\Controllers\AosSeedController@generate');
25 Route::get('aos-seed/{hash}', 'App\Http\Controllers\AosSeedController@byHash');
26 Route::post('aos-seed/{hash}/retry', 'App\Http\Controllers\AosSeedController@retry');
27
28 Route::post('application/{application}/accept', 'App\Http\Controllers\ApplicationController@accept');
29 Route::post('application/{application}/reject', 'App\Http\Controllers\ApplicationController@reject');
30
31 Route::get('discord-guilds', 'App\Http\Controllers\DiscordGuildController@search');
32 Route::get('discord-guilds/{guild_id}', 'App\Http\Controllers\DiscordGuildController@single');
33 Route::get('discord-guilds/{guild_id}/channels', 'App\Http\Controllers\DiscordChannelController@search');
34
35 Route::get('protocol/{tournament}', 'App\Http\Controllers\ProtocolController@forTournament');
36
37 Route::post('results', 'App\Http\Controllers\ResultController@create');
38
39 Route::post('rounds', 'App\Http\Controllers\RoundController@create');
40 Route::post('rounds/{round}/lock', 'App\Http\Controllers\RoundController@lock');
41 Route::post('rounds/{round}/setSeed', 'App\Http\Controllers\RoundController@setSeed');
42 Route::post('rounds/{round}/unlock', 'App\Http\Controllers\RoundController@unlock');
43
44 Route::get('tournaments/{id}', 'App\Http\Controllers\TournamentController@single');
45 Route::post('tournaments/{tournament}/apply', 'App\Http\Controllers\TournamentController@apply');
46 Route::post('tournaments/{tournament}/close', 'App\Http\Controllers\TournamentController@close');
47 Route::post('tournaments/{tournament}/discord', 'App\Http\Controllers\TournamentController@discord');
48 Route::post('tournaments/{tournament}/discord-settings', 'App\Http\Controllers\TournamentController@discordSettings');
49 Route::post('tournaments/{tournament}/lock', 'App\Http\Controllers\TournamentController@lock');
50 Route::post('tournaments/{tournament}/open', 'App\Http\Controllers\TournamentController@open');
51 Route::post('tournaments/{tournament}/unlock', 'App\Http\Controllers\TournamentController@unlock');
52
53 Route::get('users/{id}', 'App\Http\Controllers\UserController@single');
54 Route::post('users/set-language', 'App\Http\Controllers\UserController@setLanguage');
55 Route::post('users/{user}/setNickname', 'App\Http\Controllers\UserController@setNickname');
56 Route::post('users/{user}/setStreamLink', 'App\Http\Controllers\UserController@setStreamLink');