Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Changing DAU server channel variable
Browse files Browse the repository at this point in the history
  • Loading branch information
soner-yuksel committed Nov 2, 2023
1 parent a78ff18 commit ce12736
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Growth/DAU.swift
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public class DAU {
}

func channelParam(for channel: AppBuildChannel = AppConstants.buildChannel) -> URLQueryItem {
return URLQueryItem(name: "channel", value: channel.serverChannelParam)
return URLQueryItem(name: "channel", value: channel.dauServerChannelParam)
}

func braveCoreParams(for braveStats: BraveStats) -> [URLQueryItem] {
Expand Down
15 changes: 15 additions & 0 deletions Sources/Shared/AppConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ public enum AppBuildChannel: String {
return "invalid"
}
}

public var dauServerChannelParam: String {
switch self {
case .release:
return "release"
case .beta:
return "beta"
case .dev:
return "dev"
case .debug:
return "developer"
case .enterprise:
return "invalid"
}
}
}

public struct KVOConstants: Equatable {
Expand Down

0 comments on commit ce12736

Please sign in to comment.