diff options
Diffstat (limited to 'internal/api/client/admin/reportresolve.go')
-rw-r--r-- | internal/api/client/admin/reportresolve.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/api/client/admin/reportresolve.go b/internal/api/client/admin/reportresolve.go index 51c268a2d..f17ae24be 100644 --- a/internal/api/client/admin/reportresolve.go +++ b/internal/api/client/admin/reportresolve.go @@ -18,7 +18,6 @@ package admin import ( - "errors" "fmt" "net/http" @@ -107,10 +106,9 @@ func (m *Module) ReportResolvePOSTHandler(c *gin.Context) { return } - reportID := c.Param(IDKey) - if reportID == "" { - err := errors.New("no report id specified") - apiutil.ErrorHandler(c, gtserror.NewErrorBadRequest(err, err.Error()), m.processor.InstanceGetV1) + reportID, errWithCode := apiutil.ParseID(c.Param(apiutil.IDKey)) + if errWithCode != nil { + apiutil.ErrorHandler(c, errWithCode, m.processor.InstanceGetV1) return } |