Skip to content

Commit 5ce45ee

Browse files
committed
Fixing internal module detail endpoint
1 parent ff42ad9 commit 5ce45ee

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

test/main.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ import (
44
"fmt"
55
"github.com/AtlasInsideCorp/UTMStackConfigurationClient"
66
"github.com/AtlasInsideCorp/UTMStackConfigurationClient/enum"
7+
"os"
78
)
89

910
func main() {
10-
client := UTMStackConfigurationClient.NewUTMClient("EliHR1ZjPsaVdwg4CNI0X7c5QmCLOaJR", "192.168.1.59")
11-
config, err := client.GetUTMConfig(enum.O365)
11+
confKey := os.Getenv("INTERNAL_KEY")
12+
utmPanel := os.Getenv("BACKEND_HOST")
13+
client := UTMStackConfigurationClient.NewUTMClient(confKey, utmPanel)
14+
config, err := client.GetUTMConfig(enum.BITDEFENDER)
1215
if err != nil {
1316
fmt.Sprintf("Error s%", err.Error())
1417
}

util/const.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package util
22

3-
const UTMInternalKeyHeaderName = "internal-key"
3+
const UTMInternalKeyHeaderName = "Utm-Internal-Key"
44
const RegisterConfigURL string = "https://%s/api/utm-modules/registerConfiguration"
5-
const GetConfigURL string = "https://%s/api/utm-modules/moduleDetails?nameShort=%s"
5+
const GetConfigURL string = "https://%s/api/utm-modules/module-details-decrypted?nameShort=%s&serverId=1"

0 commit comments

Comments
 (0)