From 39e41f604f354fe768b54daba13845a3d99e3ea2 Mon Sep 17 00:00:00 2001
From: Paul Maruhn <paulmaruhn@posteo.de>
Date: Fri, 31 Dec 2021 05:53:16 +0100
Subject: [PATCH] fix wrong update url in template. fix #20

---
 src/web/web.rs                | 2 +-
 templates/newdomain.html.tera | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/web/web.rs b/src/web/web.rs
index 2f87b1e..4765ac7 100644
--- a/src/web/web.rs
+++ b/src/web/web.rs
@@ -90,7 +90,7 @@ pub fn newdomain(
 				"error": r.is_err(),
 				"errormsg": r,
 				"token": r,
-				"domainname": newdomain.to_string(),
+				"domainname": newdomain.to_string()
 			});
 		}
 		_ => {
diff --git a/templates/newdomain.html.tera b/templates/newdomain.html.tera
index 3b86510..80b4d0c 100644
--- a/templates/newdomain.html.tera
+++ b/templates/newdomain.html.tera
@@ -16,10 +16,10 @@
 </div>
 <div>
 	<h2>Set to your current IP:</h2>
-	<code>curl http://localhost:8053/api/update?token={{ data.token.Ok }}&domain={{ data.domainname }}</code>
+	<code>curl http://{{ server_url }}/api/update?token={{ data.token.Ok }}&domain={{ data.domainname }}</code>
 
 	<h2>Set to a specific IP:</h2>
-	<code>curl http://localhost:8053/api/update?token={{ data.token.Ok }}&domain={{ data.domainname }}&ip=1.2.3.4</code>
+	<code>curl http://{{ server_url }}/api/update?token={{ data.token.Ok }}&domain={{ data.domainname }}&ip=1.2.3.4</code>
 </div>
 {% endif %}
 
-- 
GitLab