mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
API: add Status() to RedirectResponse (#29722)
This commit is contained in:
parent
7f0802a9c9
commit
924212b42b
@ -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}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user