diff --git a/pkg/api/common.go b/pkg/api/common.go index 7c88bfd45f8..72ae41e5643 100644 --- a/pkg/api/common.go +++ b/pkg/api/common.go @@ -145,6 +145,11 @@ func (r *RedirectResponse) WriteTo(ctx *models.ReqContext) { ctx.Redirect(r.location) } +// Status gets the response's status. +func (*RedirectResponse) Status() int { + return http.StatusFound +} + func Redirect(location string) *RedirectResponse { return &RedirectResponse{location: location} }