mirror of
https://github.com/astaxie/beego.git
synced 2025-06-20 13:30:18 +00:00
fix runrouter is nil
This commit is contained in:
@ -846,7 +846,12 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
|||||||
Admin:
|
Admin:
|
||||||
//admin module record QPS
|
//admin module record QPS
|
||||||
if EnableAdmin {
|
if EnableAdmin {
|
||||||
|
if runrouter != nil {
|
||||||
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime))
|
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, runrouter.controllerType.Name(), time.Since(starttime))
|
||||||
|
} else {
|
||||||
|
go admin.StatisticsMap.AddStatistics(r.Method, requestPath, "", time.Since(starttime))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user