1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:40:55 +00:00

Redirect should returns error

This commit is contained in:
Eyal Post 2017-05-01 08:57:57 +03:00
parent 1b8f05cef1
commit d3a16dca85

View File

@ -30,7 +30,7 @@ func errorRenderer(err error) Renderer {
}
// Redirect renders http 302 with a URL
func Redirect(localurl string) Renderer {
func Redirect(localurl string) error {
return statusCodeWithRender{302, func(ctx *beecontext.Context) {
ctx.Redirect(302, localurl)
}}