mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 03:11:30 +00:00
fix runrouter is nil
This commit is contained in:
parent
6c13bdde25
commit
18335194bc
@ -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))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user