Skip to content

Commit

Permalink
feature: Optional API address configuration to db.json
Browse files Browse the repository at this point in the history
  • Loading branch information
abugraokkali committed Jan 15, 2024
1 parent d31fc4b commit 099f1ea
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/Helpers/Helpers.php
Original file line number Diff line number Diff line change
@@ -6,6 +6,10 @@
if (!function_exists('getUrl')) {
function getUrl($endpoint = "")
{
if (extensionDb('api_address')) {
return extensionDb('api_address') . "/$endpoint";
}

$tunnel = openTunnel(
server()->ip_address,
'7806',
13 changes: 11 additions & 2 deletions db.json
Original file line number Diff line number Diff line change
@@ -3,7 +3,16 @@
"publisher": "HAVELSAN A.\u015e.",
"version": "DEV",
"version_code": 1,
"database": [],
"database": [
{
"variable": "api_address",
"type": "text",
"name": "API Adresi",
"required": false,
"global": false,
"writable": false
}
],
"widgets": [],
"language": "php",
"status": 0,
@@ -12,7 +21,7 @@
"support": "aciklab@havelsan.com.tr",
"icon": "box-open",
"require_key": "false",
"verification": "verify",
"verification": null,
"dependencies": null,
"sslPorts": null,
"display_name": {

0 comments on commit 099f1ea

Please sign in to comment.