Update go.mod

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
# Conflicts:
#	dyndns/go.mod
This commit is contained in:
AuxXxilium 2024-08-05 19:24:33 +02:00
parent c7a13b40b1
commit 22ef53f247
4 changed files with 12 additions and 4 deletions

View File

@ -23,7 +23,7 @@ type Host struct {
// and sets a new LastUpdate date.
func (h *Host) UpdateHost(updateHost *Host) (updateRecord bool) {
updateRecord = false
if h.Ip != updateHost.Ip || h.Ttl != updateHost.Ttl {
if h.Ip != updateHost.Ip || h.Ttl != updateHost.Ttl || h.Ttl != updateHost.Desc {
updateRecord = true
h.LastUpdate = time.Now()
}

View File

@ -132,7 +132,7 @@ $("button.copyUrlToClipboard").click(function () {
let domain = document.getElementById('host-domain_'+id).innerHTML
let username = document.getElementById('host-username_'+id).innerHTML
let password = document.getElementById('host-password_'+id).innerHTML
let out = location.protocol + '//' +username.trim()+':'+password.trim()+'@'+ domain
let out = 'http://' +username.trim()+':'+password.trim()+'@'+ domain
out +='/update?hostname='+hostname
let dummy = document.createElement("textarea");

View File

@ -67,10 +67,16 @@
</div>
<div class="col-1"></div>
</div>
<div class="row mt-3">
<div class="col-1"></div>
<div class="col-2 text-right">Description:</div>
<div class="col-8"><input type="text" class="form-control" placeholder="Enter Description" name="desc" value="{{.host.Desc}}"></div>
<div class="col-1"></div>
</div>
<div class="row mt-3">
<div class="col-11 d-flex justify-content-end"><button id="{{.host.ID}}" class="{{.addEdit}} host btn btn-primary">{{if eq .addEdit "edit" }}Edit{{else if eq .addEdit "add" }}Add{{end}} Host Entry</button></div>
<div class="col-1"></div>
</div>
</form>
</div>
{{end}}
{{end}}

View File

@ -9,6 +9,7 @@
<th>IP</th>
<th>TTL</th>
<th>LastUpdate</th>
<th>Description</th>
<th>
<button class="addHost btn btn-primary">Add Host Entry</button>
</th>
@ -22,6 +23,7 @@
<td>{{.Ip}}</td>
<td>{{.Ttl}}</td>
<td>{{.LastUpdate.Format "01/02/2006 15:04 MEZ"}}</td>
<td>{{.Desc}}</td>
<td>
<div style="display:none">
<div id="host-username_{{.ID}}">
@ -51,4 +53,4 @@
</tbody>
</table>
</div>
{{end}}
{{end}}