mobile api changes + docker image basics

This commit is contained in:
Schneider Roland
2022-06-11 21:05:19 +02:00
parent 7e5efc2c7f
commit 067fc72ce4
207 changed files with 3803 additions and 130 deletions

View File

@@ -19,6 +19,13 @@ use yii\web\NotFoundHttpException;
class ApiController extends RestController
{
public function actionDashboardPage(){
$apiManager = new ApiManager();
return $apiManager->getDashboardPage();
}
public function actionCardPage(){
$apiManager = new ApiManager();

View File

@@ -8,6 +8,7 @@
namespace mobileapi\controllers;
use common\models\Card;
use mobileapi\models\LoginForm;
use sizeg\jwt\Jwt;
use Yii;

View File

@@ -2,6 +2,8 @@
namespace mobileapi\manager;
use common\components\DateUtil;
use common\components\Helper;
use Exception;
use Yii;
use common\models\Card;
@@ -70,8 +72,8 @@ class ApiManager
'name' => $ticket->ticketType->name,
],
'usageCount' => $ticket->usage_count,
'start' => $ticket->start,
'end' => $ticket->end
'start' => DateUtil::parseDateTime( $ticket->start)->getTimestamp(),
'end' => DateUtil::parseDateTime( $ticket->end)->getTimestamp()
];
}
return [
@@ -125,5 +127,12 @@ class ApiManager
}
public function getDashboardPage(){
return [
'virtual-key' => $this->getVirtualKeyPage(),
'card' => $this->getCardPage(),
'ticket' => $this->getTicketPage(),
];
}
}