Stabilize legacy Steven API endpoints and add OpenAPI spec

This commit is contained in:
Power BI Dev
2026-05-07 14:50:31 +07:00
parent f1c1f42a4c
commit e7b07a3cfd
17 changed files with 2755 additions and 0 deletions

View 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';
}
}