Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
@@ -0,0 +1,37 @@
<?php
namespace app\controllers;
use app\services\api\SyncCategory;
use app\services\api\SyncObject;
use yii\web\Controller;
class ApiSyncController extends Controller
{
public function beforeAction($action)
{
date_default_timezone_set('Europe/Sofia');
return parent::beforeAction($action); // TODO: Change the autogenerated stub
}
public function actionMainCategory($actionType) {
return $this->asJson((new SyncCategory())->container("main_$actionType"));
}
public function actionSubCategory($actionType) {
return $this->asJson((new SyncCategory())->container("sub_$actionType"));
}
public function actionObjectTemplate($actionType) {
return $this->asJson(['type' => $actionType]);
}
public function actionSetObject() {
return $this->asJson((new SyncObject())->container('setObject'));
}
public function actionUnsetObject() {
return $this->asJson((new SyncObject())->container('unsetObject'));
}
}