summaryrefslogtreecommitdiff
path: root/livewatch.go
blob: 7a6c02c6e46d141d64e060a47b2b855cbf00d086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package main

import (
	"io"
	"net/http"
)

func init() {
	http.HandleFunc("/livewatch", liveWatch)
}

func liveWatch(w http.ResponseWriter, r *http.Request) {
	key := r.FormValue("key")
	if len(key) != 32 {
		key = "Ok"
	}
	io.WriteString(w, key)
}