mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Upgrade Slim Framework to v4 (closes #561)
This commit is contained in:
@@ -7,7 +7,7 @@ use \Grocy\Services\ApiKeyService;
|
||||
|
||||
class CalendarApiController extends BaseApiController
|
||||
{
|
||||
public function __construct(\Slim\Container $container)
|
||||
public function __construct(\DI\Container $container)
|
||||
{
|
||||
parent::__construct($container);
|
||||
$this->CalendarService = new CalendarService();
|
||||
@@ -17,7 +17,7 @@ class CalendarApiController extends BaseApiController
|
||||
protected $CalendarService;
|
||||
protected $ApiKeyService;
|
||||
|
||||
public function Ical(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
public function Ical(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -55,12 +55,12 @@ class CalendarApiController extends BaseApiController
|
||||
}
|
||||
}
|
||||
|
||||
public function IcalSharingLink(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
public function IcalSharingLink(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args)
|
||||
{
|
||||
try
|
||||
{
|
||||
return $this->ApiResponse(array(
|
||||
'url' => $this->AppContainer->UrlManager->ConstructUrl('/api/calendar/ical?secret=' . $this->ApiKeyService->GetOrCreateApiKey(ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
|
||||
return $this->ApiResponse($response, array(
|
||||
'url' => $this->AppContainer->get('UrlManager')->ConstructUrl('/api/calendar/ical?secret=' . $this->ApiKeyService->GetOrCreateApiKey(ApiKeyService::API_KEY_TYPE_SPECIAL_PURPOSE_CALENDAR_ICAL))
|
||||
));
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
|
Reference in New Issue
Block a user