refactor(contorller): update to consider iowa_2 and look at plant token vs server going forward

This commit is contained in:
2025-09-29 12:44:46 -05:00
parent 99e70fcafb
commit a5a67660e8
4 changed files with 214 additions and 93 deletions

View File

@@ -13,7 +13,7 @@ import (
socketio "github.com/googollee/go-socket.io"
)
func copyBuild(server *socketio.Server, plant string, drive string) {
func copyBuild(server *socketio.Server, plant string, location string) {
// Load from environment in real-life code!
user := os.Getenv("ADM_USER")
pass := os.Getenv("ADM_PASS")
@@ -21,7 +21,7 @@ func copyBuild(server *socketio.Server, plant string, drive string) {
// latest build
latestbuild := lastestBuild()
src := latestbuild
plantServer := fmt.Sprintf("\\\\%v\\%v$\\lst", plant, drive)
plantServer := fmt.Sprintf("\\\\%v\\%v", plant, location)
// Build PowerShell
psScript := fmt.Sprintf(`