summaryrefslogtreecommitdiff
path: root/internal/api/client/media/mediaget.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/client/media/mediaget.go')
-rw-r--r--internal/api/client/media/mediaget.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/api/client/media/mediaget.go b/internal/api/client/media/mediaget.go
index 25471fc76..2c07024c2 100644
--- a/internal/api/client/media/mediaget.go
+++ b/internal/api/client/media/mediaget.go
@@ -69,31 +69,31 @@ import (
func (m *Module) MediaGETHandler(c *gin.Context) {
if apiVersion := c.Param(APIVersionKey); apiVersion != APIv1 {
err := errors.New("api version must be one v1 for this path")
- apiutil.ErrorHandler(c, gtserror.NewErrorNotFound(err, err.Error()), m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, gtserror.NewErrorNotFound(err, err.Error()), m.processor.InstanceGetV1)
return
}
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
}
attachmentID := c.Param(IDKey)
if attachmentID == "" {
err := errors.New("no attachment 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
}
attachment, errWithCode := m.processor.MediaGet(c.Request.Context(), authed, attachmentID)
if errWithCode != nil {
- apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGet)
+ apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1)
return
}