diff options
author | Kegsay <kegan@matrix.org> | 2020-06-16 14:53:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 14:53:19 +0100 |
commit | 1942928ee5e0398beed45c8b1c63d7b13e89b646 (patch) | |
tree | 0313e9168df851bd1eef314bbc04aed301114e4c /userapi/api | |
parent | 45011579eb65842821dff73fc2028db9d6bf7b93 (diff) |
Make federationapi use userapi (#1135)
Removes dependencies on account DB, device DB and ASAPI.
Diffstat (limited to 'userapi/api')
-rw-r--r-- | userapi/api/api.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/userapi/api/api.go b/userapi/api/api.go index 57b5165a..3ed9252c 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -20,6 +20,7 @@ import "context" type UserInternalAPI interface { QueryProfile(ctx context.Context, req *QueryProfileRequest, res *QueryProfileResponse) error QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error + QueryDevices(ctx context.Context, req *QueryDevicesRequest, res *QueryDevicesResponse) error } // QueryAccessTokenRequest is the request for QueryAccessToken @@ -36,6 +37,17 @@ type QueryAccessTokenResponse struct { Err error // e.g ErrorForbidden } +// QueryDevicesRequest is the request for QueryDevices +type QueryDevicesRequest struct { + UserID string +} + +// QueryDevicesResponse is the response for QueryDevices +type QueryDevicesResponse struct { + UserExists bool + Devices []Device +} + // QueryProfileRequest is the request for QueryProfile type QueryProfileRequest struct { // The user ID to query |