Author: Shivam Mathur (shivammathur)
Date: 2025-01-29T06:55:45+05:30
Commit: Scope routes to /api · php/web-downloads@a915a3a · GitHub
Raw diff: https://github.com/php/web-downloads/commit/a915a3a54bd7f96cb47029e5cc4261cf1380d60d.diff
Scope routes to /api
Changed paths:
M routes.php
Diff:
diff --git a/routes.php b/routes.php
index fd0bacb..7491aa7 100644
--- a/routes.php
+++ b/routes.php
@@ -7,8 +7,8 @@
use App\Router;
$router = new Router();
-$router->registerRoute('/', 'GET', IndexController::class);
-$router->registerRoute('/pecl', 'POST', PeclController::class, true);
-$router->registerRoute('/winlibs', 'POST', WinlibsController::class, true);
-$router->registerRoute('/php', 'POST', PhpController::class, true);
+$router->registerRoute('/api', 'GET', IndexController::class);
+$router->registerRoute('/api/pecl', 'POST', PeclController::class, true);
+$router->registerRoute('/api/winlibs', 'POST', WinlibsController::class, true);
+$router->registerRoute('/api/php', 'POST', PhpController::class, true);
$router->handleRequest();