Small CP api improvement

This commit is contained in:
Pinga 2023-08-08 12:39:31 +03:00
parent 1a32289121
commit 3bab10e201

View file

@ -47,10 +47,11 @@ $app->any('/api[/{params:.*}]', function (
Response $response,
$args
) use ($container) {
$db = config('connections');
$config = new Config([
'username' => 'database-user',
'password' => 'database-pass',
'database' => 'database-name',
'username' => $db['mysql']['username'],
'password' => $db['mysql']['password'],
'database' => $db['mysql']['database'],
'basePath' => '/api',
]);
$api = new Api($config);