ptut-vhost/build/api/module/department/version/switchController.php

28 lines
484 B
PHP
Raw Normal View History

2018-05-07 16:14:12 +00:00
<?php
/**
* Created by PhpStorm.
* User: lucas
* Date: 07/05/18
* Time: 17:59
*/
namespace api\module\department\version;
use database\core\Repo;
class switchController
{
public function get($args){
$version = null;
extract($args);
$versionData = Repo::getRepo("meta")->getVersionById($version);
$_SESSION['CurrentDatabase'] = $versionData["dbName"];
$_SESSION['VERSION'] = $version;
return ["success" => true];
}
}