From 92094e5c0de7e599e78a794407c9d547cd00ae05 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sat, 10 Sep 2022 14:08:45 -0600 Subject: [PATCH] Moved to better status codes --- back/lib/http_res | 1 + back/srv/dashboard/add | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/back/lib/http_res b/back/lib/http_res index 15d60df..c56ea9a 100755 --- a/back/lib/http_res +++ b/back/lib/http_res @@ -7,6 +7,7 @@ status='' case "${1}" in ''|'0'|'200') status='200 OK\n';; + '201') status='201 Created\n';; '202') status='202 Accepted\n';; '400') status='400 Bad Request\n';; '500') status='500 Internal Server Error\n';; diff --git a/back/srv/dashboard/add b/back/srv/dashboard/add index 42b0ed1..aca9c45 100755 --- a/back/srv/dashboard/add +++ b/back/srv/dashboard/add @@ -126,7 +126,7 @@ wg_config="[Interface] # ${hostname}.${username}.${TLD}\nPrivateKey=${privkey}\n # if wireguard worked, there's no going back. The admin # can clean up missing records and certs after checking the logs set -x -<<<"${wg_config}" "${LIB_DIR}/http_res" +<<<"${wg_config}" "${LIB_DIR}/http_res" 202 set +x # Update nameserver