summaryrefslogtreecommitdiff
path: root/internal/api/client/statuses/statusfavedby.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-02-02 14:08:13 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-02 14:08:13 +0100
commit382512a5a6cc3f13576bbde8d607098d019f4063 (patch)
treedc2ccd1d30cd65b3f3d576a8d2a6910bbecc593a /internal/api/client/statuses/statusfavedby.go
parent[chore/performance] use only 1 sqlite db connection regardless of multiplier ... (diff)
downloadgotosocial-382512a5a6cc3f13576bbde8d607098d019f4063.tar.xz
[feature] Implement `/api/v2/instance` endpoint (#1409)
* interim: start adding /api/v2/instance * finish up
Diffstat (limited to 'internal/api/client/statuses/statusfavedby.go')
-rw-r--r--internal/api/client/statuses/statusfavedby.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/api/client/statuses/statusfavedby.go b/internal/api/client/statuses/statusfavedby.go
index c739128c3..1991402cb 100644
--- a/internal/api/client/statuses/statusfavedby.go
+++ b/internal/api/client/statuses/statusfavedby.go
@@ -72,25 +72,25 @@ import (
func (m *Module) StatusFavedByGETHandler(c *gin.Context) {
authed, err := oauth.Authed(c, true, true, true, true)
if err != nil {
- apiutil.ErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, gtserror.NewErrorUnauthorized(err, err.Error()), m.processor.InstanceGetV1)
return
}
if _, err := apiutil.NegotiateAccept(c, apiutil.JSONAcceptHeaders...); err != nil {
- apiutil.ErrorHandler(c, gtserror.NewErrorNotAcceptable(err, err.Error()), m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, gtserror.NewErrorNotAcceptable(err, err.Error()), m.processor.InstanceGetV1)
return
}
targetStatusID := c.Param(IDKey)
if targetStatusID == "" {
err := errors.New("no status id specified")
- apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1)
return
}
apiAccounts, errWithCode := m.processor.StatusFavedBy(c.Request.Context(), authed, targetStatusID)
if errWithCode != nil {
- apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}