log.go 706 B

123456789101112131415161718192021222324252627282930
  1. package web
  2. import (
  3. "context"
  4. v1 "github.com/go-nunu/nunu-layout-advanced/api/v1"
  5. )
  6. // EditLog 修改日志配置
  7. func (s *AidedWebService) EditLog(ctx context.Context, webId int64) error {
  8. webConfigId, err := s.webForwardingRepository.GetWebConfigId(ctx, webId)
  9. if err != nil {
  10. return err
  11. }
  12. if err := s.cdn.EditWebLog(ctx, webConfigId, v1.WebLog{
  13. IsPrior: false,
  14. IsOn: true,
  15. Fields: []int64{1, 2, 6, 7},
  16. Status1: true,
  17. Status2: true,
  18. Status3: true,
  19. Status4: true,
  20. Status5: true,
  21. FirewallOnly: false,
  22. EnableClientClosed: false,
  23. }); err != nil {
  24. return err
  25. }
  26. return nil
  27. }