parent
09d9911293
commit
a36f07d0c1
|
|
@ -30,7 +30,8 @@ func (v01 *V01) _listen() {
|
|||
s := &http.Server{
|
||||
Addr: v01.cfg.Feedback.Addr,
|
||||
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("%s", r.URL.String())
|
||||
start := time.Now()
|
||||
defer func() { log.Printf("%vms | %s %s", time.Since(start).Milliseconds(), r.Method, r.URL) }()
|
||||
v01.cfg.lock.Lock()
|
||||
defer v01.cfg.lock.Unlock()
|
||||
if r.Method == http.MethodGet {
|
||||
|
|
@ -279,8 +280,8 @@ func (v01 *V01) serveGMElect(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
func (v01 *V01) serveGMVote(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.Method {
|
||||
case http.MethodGet:
|
||||
switch r.URL.Query().Get("payload") {
|
||||
case "":
|
||||
counts := map[string]string{}
|
||||
for k, v := range v01.cfg.Users {
|
||||
if v.State.GM.Vote != "" {
|
||||
|
|
|
|||
Loading…
Reference in New Issue