Ver código fonte

update http status

LinkLeong 2 anos atrás
pai
commit
80c347ac01
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      common/notify.go

+ 2 - 2
common/notify.go

@@ -36,7 +36,7 @@ func (n *notifyService) SendNotify(path string, message map[string]interface{})
 		return err
 		return err
 	}
 	}
 
 
-	if response.StatusCode != http.StatusCreated {
+	if response.StatusCode != http.StatusOK {
 		return errors.New("failed to send notify (status code: " + fmt.Sprint(response.StatusCode) + ")")
 		return errors.New("failed to send notify (status code: " + fmt.Sprint(response.StatusCode) + ")")
 	}
 	}
 	return nil
 	return nil
@@ -58,7 +58,7 @@ func (n *notifyService) SendSystemStatusNotify(message map[string]interface{}) e
 		return err
 		return err
 	}
 	}
 
 
-	if response.StatusCode != http.StatusCreated {
+	if response.StatusCode != http.StatusOK {
 		return errors.New("failed to send notify (status code: " + fmt.Sprint(response.StatusCode) + ")")
 		return errors.New("failed to send notify (status code: " + fmt.Sprint(response.StatusCode) + ")")
 	}
 	}
 	return nil
 	return nil