This commit is contained in:
Imbus 2024-02-20 15:54:40 +01:00
parent 540e8bcc79
commit dec43d2dba

View file

@ -19,7 +19,7 @@ type ButtonState struct {
// Keep in mind that concurrent state access is not (usually) safe // Keep in mind that concurrent state access is not (usually) safe
// And will in pracice be guarded by a mutex // And will in pracice be guarded by a mutex
func (b *ButtonState) pressHandler(w http.ResponseWriter, r *http.Request) { func (b *ButtonState) pressHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != "POST" { if r.Method == "POST" {
b.PressCount++ b.PressCount++
} }