Remapped backend endpoints to /backend instead of /backends.

This commit is contained in:
abdulmohsen
2024-05-04 10:57:34 +03:00
parent f1417a554b
commit 041a325e3e
19 changed files with 307 additions and 114 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
namespace App\API\System;
use App\Libs\Attributes\Route\Get;
use App\Libs\Config;
use App\Libs\HTTP_STATUS;
use Psr\Http\Message\ResponseInterface as iResponse;
use Psr\Http\Message\ServerRequestInterface as iRequest;
final class Supported
{
public const string URL = '%{api.prefix}/system/supported';
#[Get(self::URL . '[/]', name: 'system.supported')]
public function __invoke(iRequest $request): iResponse
{
return api_response(HTTP_STATUS::HTTP_OK, [
'supported' => array_keys(Config::get('supported')),
]);
}
}