Skip to content

Commit dc60062

Browse files
ymadammkelly
authored andcommitted
chore: remove /device/ui-config.js endpoint (jetkvm#678)
1 parent 8f76e1f commit dc60062

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

web.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ func setupRouter() *gin.Engine {
9797
// We use this to determine if the device is setup
9898
r.GET("/device/status", handleDeviceStatus)
9999

100-
// We use this to provide the UI with the device configuration
101-
r.GET("/device/ui-config.js", handleDeviceUIConfig)
102-
103100
// We use this to setup the device in the welcome page
104101
r.POST("/device/setup", handleSetup)
105102

@@ -694,21 +691,6 @@ func handleCloudState(c *gin.Context) {
694691
c.JSON(http.StatusOK, response)
695692
}
696693

697-
func handleDeviceUIConfig(c *gin.Context) {
698-
config, _ := json.Marshal(gin.H{
699-
"CLOUD_API": config.CloudURL,
700-
"DEVICE_VERSION": builtAppVersion,
701-
})
702-
if config == nil {
703-
c.JSON(http.StatusInternalServerError, gin.H{"error": "Failed to marshal config"})
704-
return
705-
}
706-
707-
response := fmt.Sprintf("window.JETKVM_CONFIG = %s;", config)
708-
709-
c.Data(http.StatusOK, "text/javascript; charset=utf-8", []byte(response))
710-
}
711-
712694
func handleSetup(c *gin.Context) {
713695
// Check if the device is already set up
714696
if config.LocalAuthMode != "" || config.HashedPassword != "" {

0 commit comments

Comments
 (0)