mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 14:44:45 +02:00
Added log page and log api
This commit is contained in:
parent
5133b005a5
commit
b245bae65a
3 changed files with 98 additions and 63 deletions
|
@ -79,6 +79,23 @@ $app->any('/api[/{params:.*}]', function (
|
|||
return $response;
|
||||
});
|
||||
|
||||
$app->any('/log-api[/{params:.*}]', function (
|
||||
ServerRequest $request,
|
||||
Response $response,
|
||||
$args
|
||||
) use ($container) {
|
||||
$db = config('connections');
|
||||
$config = new Config([
|
||||
'username' => $db['mysql']['username'],
|
||||
'password' => $db['mysql']['password'],
|
||||
'database' => 'registryTransaction',
|
||||
'basePath' => '/log-api',
|
||||
]);
|
||||
$api = new Api($config);
|
||||
$response = $api->handle($request);
|
||||
return $response;
|
||||
});
|
||||
|
||||
$app->add(function (Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Server\RequestHandlerInterface $handler) {
|
||||
try {
|
||||
return $handler->handle($request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue