Skip to content

Commit

Permalink
feat: atlasnet
Browse files Browse the repository at this point in the history
  • Loading branch information
mindrunner committed Sep 3, 2024
1 parent 61a975a commit 2248a41
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apiService.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ func getLatest(c *gin.Context) {
cluster := c.Param("cluster")
var ret DataPoint1MinResultJSON
switch cluster {
case "atlasnet":
ret = GetLatestResult(Atlasnet)
case "mainnet-beta":
ret = GetLatestResult(MainnetBeta)
case "testnet":
Expand Down Expand Up @@ -129,6 +131,8 @@ func last6hoursNoPrice(c *gin.Context) {
cluster := c.Param("cluster")
var ret []DataPoint1MinResultJSON
switch cluster {
case "atlasnet":
ret = GetLast6hours(Atlasnet, NoComputeUnitPrice, 0)
case "mainnet-beta":
ret = GetLast6hours(MainnetBeta, NoComputeUnitPrice, 0)
case "testnet":
Expand All @@ -146,6 +150,8 @@ func last6hoursAll(c *gin.Context) {
cluster := c.Param("cluster")
var ret []DataPoint1MinResultJSON
switch cluster {
case "atlasnet":
ret = GetLast6hours(Atlasnet, AllData, 0)
case "mainnet-beta":
ret = GetLast6hours(MainnetBeta, AllData, 0)
case "testnet":
Expand Down Expand Up @@ -213,6 +219,8 @@ func GetLast6hours(c Cluster, priceType ComputeUnitPriceType, threshold uint64)

func GetClusterConfig(c Cluster) ClusterConfig {
switch c {
case Atlasnet:
return config.Atlasnet
case MainnetBeta:
return config.Mainnet
case Testnet:
Expand Down

0 comments on commit 2248a41

Please sign in to comment.