feat(error_reporting): integrate error reporting

This commit is contained in:
hexxa 2021-12-30 10:33:13 +08:00 committed by Hexxa
parent 9a7cfcb097
commit 711a3a874f
9 changed files with 86 additions and 57 deletions

View file

@ -55,9 +55,9 @@ func (cl *SettingsClient) SetClientCfg(cfg *sitestore.ClientConfig, token *http.
End()
}
func (cl *SettingsClient) ReportError(report *settings.ClientErrorReport, token *http.Cookie) (*http.Response, string, []error) {
func (cl *SettingsClient) ReportErrors(reports *settings.ClientErrorReports, token *http.Cookie) (*http.Response, string, []error) {
return cl.r.Post(cl.url("/v1/settings/errors")).
AddCookie(token).
Send(report).
Send(reports).
End()
}