实现统计设置

This commit is contained in:
GoEdgeLab
2020-09-20 14:48:41 +08:00
parent ea7499ff5d
commit eb38e7d050
3 changed files with 43 additions and 0 deletions

View File

@@ -177,3 +177,18 @@ func (this *HTTPWebService) UpdateHTTPAccessLog(ctx context.Context, req *pb.Upd
}
return rpcutils.RPCUpdateSuccess()
}
// 更改统计配置
func (this *HTTPWebService) UpdateHTTPStat(ctx context.Context, req *pb.UpdateHTTPStatRequest) (*pb.RPCUpdateSuccess, error) {
// 校验请求
_, _, err := rpcutils.ValidateRequest(ctx, rpcutils.UserTypeAdmin)
if err != nil {
return nil, err
}
err = models.SharedHTTPWebDAO.UpdateWebStat(req.WebId, req.StatJSON)
if err != nil {
return nil, err
}
return rpcutils.RPCUpdateSuccess()
}