about summary refs log tree commit diff stats
path: root/svc/svc.go
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.dev>2021-10-21 21:31:17 -0400
committerBenjamin Morrison <ben@gbmor.dev>2021-10-21 21:35:23 -0400
commitdd3d87bd97e41c77eea270812d338139fd87b9fc (patch)
tree5ee99ab38e00c41190f82bef4b08a298c914f329 /svc/svc.go
parentdcb254618dc5541bb50c488c96b5e02c36951c06 (diff)
downloadgetwtxt-dd3d87bd97e41c77eea270812d338139fd87b9fc.tar.gz
delete a user, new config option for admin pass. pass is bcrypt hashed on startup and not stored in plaintext.
Diffstat (limited to 'svc/svc.go')
-rw-r--r--svc/svc.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/svc/svc.go b/svc/svc.go
index 72ccdc3..10cf56a 100644
--- a/svc/svc.go
+++ b/svc/svc.go
@@ -91,6 +91,10 @@ func setIndexRouting(index *mux.Router) {
 }
 
 func setEndpointRouting(api *mux.Router) {
+	api.Path("/admin/users").
+		Methods("DELETE").
+		HandlerFunc(handleUserDelete)
+
 	// May add support for other formats later.
 	// Making this future-proof.
 	api.Path("/{format:(?:plain)}").