FIX: Remove login for API
This commit is contained in:
@ -2,9 +2,6 @@
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
return [
|
||||
Psr\Http\Message\ResponseFactoryInterface::class => function(ContainerInterface $container) {
|
||||
return $container->get(Nyholm\Psr7\Factory\Psr17Factory::class);
|
||||
},
|
||||
Incoviba\Middleware\Authentication::class => function(ContainerInterface $container) {
|
||||
return new Incoviba\Middleware\Authentication(
|
||||
$container->get(Psr\Http\Message\ResponseFactoryInterface::class),
|
||||
@ -13,5 +10,11 @@ return [
|
||||
$container->get(Incoviba\Common\Alias\View::class),
|
||||
implode('/', [$container->get('APP_URL'), 'login'])
|
||||
);
|
||||
},
|
||||
Incoviba\Middleware\API::class => function(ContainerInterface $container) {
|
||||
return new Incoviba\Middleware\API(
|
||||
$container->get(Psr\Http\Message\ResponseFactoryInterface::class),
|
||||
$container->get('API_KEY')
|
||||
);
|
||||
}
|
||||
];
|
||||
|
@ -9,6 +9,7 @@ return [
|
||||
'money_url' => '',
|
||||
'login' => $container->get(Incoviba\Service\Login::class),
|
||||
'format' => $container->get(Incoviba\Service\Format::class),
|
||||
'API_KEY' => $container->get('API_KEY'),
|
||||
];
|
||||
if ($global_variables['login']->isIn()) {
|
||||
$global_variables['user'] = $global_variables['login']->getUser();
|
||||
|
Reference in New Issue
Block a user