Stabilize legacy Steven API endpoints and add OpenAPI spec
This commit is contained in:
49
steven/conf/class.server.php
Normal file
49
steven/conf/class.server.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
class Server
|
||||
{
|
||||
public $host;
|
||||
public $secretKeyRobot;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$appUrl = rtrim((string) (getenv('APP_URL') ?: 'https://spota.untan.ac.id'), '/');
|
||||
$this->host = $appUrl;
|
||||
$this->secretKeyRobot = (string) (getenv('SPOTA_LEGACY_API_SECRET') ?: 'in14d4lahP4ssWordSP0TA!12!');
|
||||
}
|
||||
|
||||
public function getSecretKeyRobot()
|
||||
{
|
||||
return $this->secretKeyRobot;
|
||||
}
|
||||
|
||||
public function getAPIUrl()
|
||||
{
|
||||
return $this->host.'/API/web';
|
||||
}
|
||||
|
||||
public function getHostUrl()
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
public function getLoginPage()
|
||||
{
|
||||
return $this->host;
|
||||
}
|
||||
|
||||
public function getDataTableURL()
|
||||
{
|
||||
return $this->host.'/API/datatable';
|
||||
}
|
||||
|
||||
public function getPrintUrl()
|
||||
{
|
||||
return $this->host.'/print';
|
||||
}
|
||||
|
||||
public function getBerkasUrl()
|
||||
{
|
||||
return $this->host.'/berkas';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user