mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 22:22:46 +00:00
Make federationapi use userapi (#1135)
Removes dependencies on account DB, device DB and ASAPI.
This commit is contained in:
parent
45011579eb
commit
1942928ee5
12 changed files with 102 additions and 66 deletions
|
@ -28,6 +28,7 @@ import (
|
|||
const (
|
||||
QueryProfilePath = "/userapi/queryProfile"
|
||||
QueryAccessTokenPath = "/userapi/queryAccessToken"
|
||||
QueryDevicesPath = "/userapi/queryDevices"
|
||||
)
|
||||
|
||||
// NewUserAPIClient creates a UserInternalAPI implemented by talking to a HTTP POST API.
|
||||
|
@ -73,3 +74,11 @@ func (h *httpUserInternalAPI) QueryAccessToken(
|
|||
apiURL := h.apiURL + QueryAccessTokenPath
|
||||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response)
|
||||
}
|
||||
|
||||
func (h *httpUserInternalAPI) QueryDevices(ctx context.Context, req *api.QueryDevicesRequest, res *api.QueryDevicesResponse) error {
|
||||
span, ctx := opentracing.StartSpanFromContext(ctx, "QueryDevices")
|
||||
defer span.Finish()
|
||||
|
||||
apiURL := h.apiURL + QueryDevicesPath
|
||||
return httputil.PostJSON(ctx, span, h.httpClient, apiURL, req, res)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue