mirror of
https://github.com/astaxie/beego.git
synced 2025-06-20 07:20:39 +00:00
Redirect should returns error
This commit is contained in:
@ -30,7 +30,7 @@ func errorRenderer(err error) Renderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redirect renders http 302 with a URL
|
// Redirect renders http 302 with a URL
|
||||||
func Redirect(localurl string) Renderer {
|
func Redirect(localurl string) error {
|
||||||
return statusCodeWithRender{302, func(ctx *beecontext.Context) {
|
return statusCodeWithRender{302, func(ctx *beecontext.Context) {
|
||||||
ctx.Redirect(302, localurl)
|
ctx.Redirect(302, localurl)
|
||||||
}}
|
}}
|
||||||
|
Reference in New Issue
Block a user