mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 05:42:46 +00:00
Implement key uploads (#1202)
* Add storage layer for postgres/sqlite * Return OTK counts when inserting new keys * Hook up the key DB and make a test pass * Convert postgres queries to be sqlite queries * Blacklist test due to requiring rejected events * Unbreak tests * Update blacklist
This commit is contained in:
parent
b4c07995d6
commit
9dd2ed7f65
30 changed files with 868 additions and 27 deletions
|
@ -63,7 +63,7 @@ func (h *httpKeyInternalAPI) PerformClaimKeys(
|
|||
err := httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
if err != nil {
|
||||
response.Error = &api.KeyError{
|
||||
Error: err.Error(),
|
||||
Err: err.Error(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ func (h *httpKeyInternalAPI) PerformUploadKeys(
|
|||
err := httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
if err != nil {
|
||||
response.Error = &api.KeyError{
|
||||
Error: err.Error(),
|
||||
Err: err.Error(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -97,7 +97,7 @@ func (h *httpKeyInternalAPI) QueryKeys(
|
|||
err := httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
if err != nil {
|
||||
response.Error = &api.KeyError{
|
||||
Error: err.Error(),
|
||||
Err: err.Error(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue