summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-13 16:14:22 -0600
committerJeff Carr <[email protected]>2024-02-13 16:14:22 -0600
commit355234774df949852450d50285bddbd2a7f6e3ac (patch)
tree4b1e5494ecdbad68211be615c4fabc6dc1184bdc /main.go
parent270a08696391c6f80a58ac5d2ed6765ddb7869ba (diff)
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.go b/main.go
index db00f9d..ff8200c 100644
--- a/main.go
+++ b/main.go
@@ -71,6 +71,15 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
if tmp == "/update" {
return
}
+ if tmp == "/register" {
+ regfile, _ := os.OpenFile("/home/jcarr/regfile.log", os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
+ if registerClient(regfile, r) {
+ fmt.Fprintln(w, "OK")
+ } else {
+ fmt.Fprintln(w, "FAILED")
+ }
+ return
+ }
if tmp == "/list" {
findFile(w, "files/repomap")
return