server.go: Handle errors on inserting individual events
This commit is contained in:
parent
4fda36f75e
commit
ad8156210f
@ -126,7 +126,11 @@ func putEvents(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
for _, event := range events.Events {
|
for _, event := range events.Events {
|
||||||
DatabaseAddEvent(db, event)
|
err = DatabaseAddEvent(db, event)
|
||||||
|
if err != nil {
|
||||||
|
error_message = err.Error()
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
broadcastToPollers("aclindsa", events.Events[0]) //TODO support more than one user
|
broadcastToPollers("aclindsa", events.Events[0]) //TODO support more than one user
|
||||||
|
Loading…
Reference in New Issue
Block a user