fix some errors

Re-working mongo.InsertError
This commit is contained in:
Caleb Gardner
2024-06-26 06:59:21 -05:00
parent 3a35a85100
commit b58fb76b67
4 changed files with 47 additions and 36 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ type countLogReq struct {
func (b *Backend) countLog(w http.ResponseWriter, r *http.Request) {
hdr, err := b.VerifyHeader(w, r, "count", false)
if hdr == nil {
if err == nil {
if err != nil {
log.Println("request key parsing error:", err)
}
return
@@ -101,7 +101,7 @@ func addToCountTable(w http.ResponseWriter, c CountTable, platform string, curDa
func (b *Backend) getCount(w http.ResponseWriter, r *http.Request) {
hdr, err := b.VerifyHeader(w, r, "management", true)
if hdr == nil {
if err == nil {
if err != nil {
log.Println("request key parsing error:", err)
}
return