diff options
author | 2023-02-02 14:08:13 +0100 | |
---|---|---|
committer | 2023-02-02 14:08:13 +0100 | |
commit | 382512a5a6cc3f13576bbde8d607098d019f4063 (patch) | |
tree | dc2ccd1d30cd65b3f3d576a8d2a6910bbecc593a /internal/processing/processor.go | |
parent | [chore/performance] use only 1 sqlite db connection regardless of multiplier ... (diff) | |
download | gotosocial-382512a5a6cc3f13576bbde8d607098d019f4063.tar.xz |
[feature] Implement `/api/v2/instance` endpoint (#1409)
* interim: start adding /api/v2/instance
* finish up
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r-- | internal/processing/processor.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go index 68a4c5fa4..6ea860c78 100644 --- a/internal/processing/processor.go +++ b/internal/processing/processor.go @@ -170,13 +170,15 @@ type Processor interface { // FollowRequestReject handles the rejection of a follow request from the given account ID. FollowRequestReject(ctx context.Context, auth *oauth.Auth, accountID string) (*apimodel.Relationship, gtserror.WithCode) - // InstanceGet retrieves instance information for serving at api/v1/instance - InstanceGet(ctx context.Context, domain string) (*apimodel.Instance, gtserror.WithCode) + // InstanceGetV1 retrieves instance information for serving at api/v1/instance + InstanceGetV1(ctx context.Context) (*apimodel.InstanceV1, gtserror.WithCode) + // InstanceGetV1 retrieves instance information for serving at api/v2/instance + InstanceGetV2(ctx context.Context) (*apimodel.InstanceV2, gtserror.WithCode) InstancePeersGet(ctx context.Context, includeSuspended bool, includeOpen bool, flat bool) (interface{}, gtserror.WithCode) // InstancePatch updates this instance according to the given form. // // It should already be ascertained that the requesting account is authenticated and an admin. - InstancePatch(ctx context.Context, form *apimodel.InstanceSettingsUpdateRequest) (*apimodel.Instance, gtserror.WithCode) + InstancePatch(ctx context.Context, form *apimodel.InstanceSettingsUpdateRequest) (*apimodel.InstanceV1, gtserror.WithCode) // MediaCreate handles the creation of a media attachment, using the given form. MediaCreate(ctx context.Context, authed *oauth.Auth, form *apimodel.AttachmentRequest) (*apimodel.Attachment, gtserror.WithCode) |