don't do work for stale requests
This commit is contained in:
parent
31a960b0d1
commit
40fb10d25a
4
web.go
4
web.go
|
@ -1071,7 +1071,7 @@ func zonkit(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if wherefore == "ack" {
|
||||
xonk := getxonk(userinfo.UserID, what)
|
||||
if xonk != nil {
|
||||
if xonk != nil && !xonk.IsAcked() {
|
||||
_, err := stmtUpdateFlags.Exec(flagIsAcked, xonk.ID)
|
||||
if err != nil {
|
||||
log.Printf("error acking: %s", err)
|
||||
|
@ -1083,7 +1083,7 @@ func zonkit(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if wherefore == "deack" {
|
||||
xonk := getxonk(userinfo.UserID, what)
|
||||
if xonk != nil {
|
||||
if xonk != nil && xonk.IsAcked() {
|
||||
_, err := stmtClearFlags.Exec(flagIsAcked, xonk.ID)
|
||||
if err != nil {
|
||||
log.Printf("error deacking: %s", err)
|
||||
|
|
Loading…
Reference in New Issue