use synchronized GetParticipants to ensure eliminate timing issues upon participant join
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
@@ -153,14 +152,6 @@ type errStruct struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
func writeJSONError(w http.ResponseWriter, code int, error ...string) {
|
||||
w.Header().Set("Content-Type", "application/json; charset=utf-8")
|
||||
w.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
w.WriteHeader(code)
|
||||
|
||||
json.NewEncoder(w).Encode(jsonError(code, error...))
|
||||
}
|
||||
|
||||
func jsonError(code int, error ...string) errStruct {
|
||||
es := errStruct{
|
||||
StatusCode: code,
|
||||
|
||||
Reference in New Issue
Block a user