mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 12:30:54 +00:00
runnable typo fixed
This commit is contained in:
parent
39e29caf9b
commit
7ef9b3d55b
@ -717,18 +717,18 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
if doFilter(BeforeExec) {
|
||||
goto Admin
|
||||
}
|
||||
isRunable := false
|
||||
isRunnable := false
|
||||
if routerInfo != nil {
|
||||
if routerInfo.routerType == routerTypeRESTFul {
|
||||
if _, ok := routerInfo.methods[r.Method]; ok {
|
||||
isRunable = true
|
||||
isRunnable = true
|
||||
routerInfo.runFunction(context)
|
||||
} else {
|
||||
exception("405", context)
|
||||
goto Admin
|
||||
}
|
||||
} else if routerInfo.routerType == routerTypeHandler {
|
||||
isRunable = true
|
||||
isRunnable = true
|
||||
routerInfo.handler.ServeHTTP(rw, r)
|
||||
} else {
|
||||
runrouter = routerInfo.controllerType
|
||||
@ -750,7 +750,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
// also defined runrouter & runMethod from filter
|
||||
if !isRunable {
|
||||
if !isRunnable {
|
||||
//Invoke the request handler
|
||||
vc := reflect.New(runrouter)
|
||||
execController, ok := vc.Interface().(ControllerInterface)
|
||||
|
Loading…
Reference in New Issue
Block a user