mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
Stuff i guess ?
This commit is contained in:
24
routes/api.php
Normal file
24
routes/api.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Slim\Routing\RouteCollectorProxy;
|
||||
|
||||
// API routes (no authentication required for basic operations)
|
||||
$app->group('/api', function (RouteCollectorProxy $apiGroup) {
|
||||
|
||||
// Playnite API endpoints
|
||||
$apiGroup->group('/playnite', function (RouteCollectorProxy $playniteGroup) {
|
||||
// Game management
|
||||
$playniteGroup->post('/media', 'App\Controllers\Api\PlayniteController:insertGames')->setName('api.playnite.games');
|
||||
$playniteGroup->put('/update/games/', 'App\Controllers\Api\PlayniteController:updateGames')->setName('api.playnite.update');
|
||||
$playniteGroup->put('/v1/games/delete', 'App\Controllers\Api\PlayniteController:deleteGames')->setName('api.playnite.delete');
|
||||
|
||||
// Image upload
|
||||
$playniteGroup->post('/image/base64', 'App\Controllers\Api\PlayniteController:uploadImages')->setName('api.playnite.images');
|
||||
});
|
||||
|
||||
// User authentication check (requires authentication)
|
||||
$apiGroup->get('/v1/users/me', 'App\Controllers\Api\AuthController:checkAuth')->setName('api.auth.check')->add('App\Http\Middleware\AuthMiddleware');
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user