FIX create unknow name
Some checks failed
dev workflow / test (push) Successful in 17s
dev workflow / vulnCheck (push) Successful in 26s
Build Push Prod / build (push) Failing after 5s
Generic Build / build (push) Successful in 24s

This commit is contained in:
maximo tejeda 2024-12-10 12:46:18 -04:00
parent dcb4c5cfc6
commit 574467e307
2 changed files with 7 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,2 +1,3 @@
/.env /.env
bin/* bin/*
/.env2

View File

@ -227,6 +227,11 @@ func (app *Application) Operation(op string, name, tipo, ipSTR,rID, comment stri
if name == "" { if name == "" {
panic("name cant be empty for op create") panic("name cant be empty for op create")
} }
if dn == "" {
app.log.Debug("domains available", "domains", app.zoneRecords)
dn = name
}
fmt.Printf("domain name: %s", dn) fmt.Printf("domain name: %s", dn)
rBody = app.GenerateReqBody(dn, tipo, app.publicIP.String(),comment, proxied) rBody = app.GenerateReqBody(dn, tipo, app.publicIP.String(),comment, proxied)
app.Create(*rBody) app.Create(*rBody)