fix
This commit is contained in:
parent
d691648916
commit
c08950c10a
|
@ -6,11 +6,11 @@ import (
|
|||
"net/http"
|
||||
)
|
||||
|
||||
func New(endpoint string, data LogRequest) error {
|
||||
func New(endpoint string, data []*LogItem) error {
|
||||
go PostLog(data, endpoint)
|
||||
return nil
|
||||
}
|
||||
func PostLog(data LogRequest, endpoint string) (resp *http.Response, err error) {
|
||||
func PostLog(data []*LogItem, endpoint string) (resp *http.Response, err error) {
|
||||
jsonBytes, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in New Issue