Skip to content

Commit

Permalink
apache#79 modify
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoYL123 committed Feb 29, 2020
1 parent fe24029 commit 4743b2e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions server/resource/v1/history_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,22 @@ func (r *HistoryResource) GetRevisions(context *restful.Context) {

//GetPollingData get the record of the get or list history
func (r *HistoryResource) GetPollingData(context *restful.Context) {
query := &model.PollingDetail{
SessionID: context.ReadQueryParameter("sessionId"),
IP: context.ReadQueryParameter("ip"),
URLPath: context.ReadQueryParameter("urlPath"),
UserAgent: context.ReadQueryParameter("userAgent"),
query := &model.PollingDetail{}
sessionId := context.ReadQueryParameter("sessionId")
if sessionId != "" {
query.SessionID = sessionId
}
ip := context.ReadQueryParameter("ip")
if ip != "" {
query.IP = ip
}
urlPath := context.ReadQueryParameter("urlPath")
if urlPath != "" {
query.URLPath = urlPath
}
userAgent := context.ReadQueryParameter("userAgent")
if userAgent != "" {
query.UserAgent = userAgent
}
domain := ReadDomain(context)
if domain == nil {
Expand Down

0 comments on commit 4743b2e

Please sign in to comment.