feat(be/settings): add api for reporting client error

This commit is contained in:
hexxa 2021-12-27 16:52:30 +08:00 committed by Hexxa
parent 4fd9bd9c33
commit 7577fb0ace
5 changed files with 67 additions and 2 deletions

View file

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