feat(enterprise): align account limits API
This commit is contained in:
+10
-9
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gochat/gochat/internal/config"
|
||||
v1 "github.com/gochat/gochat/internal/handler/api/v1"
|
||||
"github.com/gochat/gochat/internal/middleware"
|
||||
"github.com/gochat/gochat/internal/router"
|
||||
)
|
||||
@@ -22,21 +23,21 @@ func main() {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Create a zero-value Handlers struct — we only need route paths, not working handlers
|
||||
handlers := &router.Handlers{}
|
||||
// Create mostly zero-value handlers — we only need route paths, not working handlers.
|
||||
handlers := &router.Handlers{EnterpriseAccount: v1.NewEnterpriseAccountHandler(nil)}
|
||||
|
||||
corsCfg := middleware.CORSConfigFromAppConfig(cfg)
|
||||
router.RegisterRoutes(
|
||||
engine,
|
||||
nil, // jwtService
|
||||
nil, // refreshStore
|
||||
nil, // webhookRegistry
|
||||
nil, // jwtService
|
||||
nil, // refreshStore
|
||||
nil, // webhookRegistry
|
||||
handlers,
|
||||
nil, // hub
|
||||
nil, // wsAuthenticator
|
||||
nil, // hub
|
||||
nil, // wsAuthenticator
|
||||
&cfg.JWT,
|
||||
corsCfg,
|
||||
nil, // db
|
||||
nil, // db
|
||||
)
|
||||
|
||||
routes := engine.Routes()
|
||||
@@ -56,4 +57,4 @@ func main() {
|
||||
count++
|
||||
}
|
||||
fmt.Printf("TOTAL: %d\n", count)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,11 @@ var criticalRoutes = []route{
|
||||
{Method: "GET", Path: "/google/callback", Controller: "google/callbacks#show", Source: "routes.rb:650"},
|
||||
{Method: "GET", Path: "/instagram/callback", Controller: "instagram/callbacks#show", Source: "routes.rb:651"},
|
||||
{Method: "GET", Path: "/tiktok/callback", Controller: "tiktok/callbacks#show", Source: "routes.rb:652"},
|
||||
{Method: "POST", Path: "/enterprise/api/v1/accounts/:account_id/checkout", Controller: "enterprise/api/v1/accounts#checkout", Source: "routes.rb:523"},
|
||||
{Method: "POST", Path: "/enterprise/api/v1/accounts/:account_id/subscription", Controller: "enterprise/api/v1/accounts#subscription", Source: "routes.rb:524"},
|
||||
{Method: "GET", Path: "/enterprise/api/v1/accounts/:account_id/limits", Controller: "enterprise/api/v1/accounts#limits", Source: "routes.rb:525"},
|
||||
{Method: "POST", Path: "/enterprise/api/v1/accounts/:account_id/toggle_deletion", Controller: "enterprise/api/v1/accounts#toggle_deletion", Source: "routes.rb:526"},
|
||||
{Method: "POST", Path: "/enterprise/api/v1/accounts/:account_id/topup_checkout", Controller: "enterprise/api/v1/accounts#topup_checkout", Source: "routes.rb:527"},
|
||||
|
||||
{Method: "POST", Path: "/api/v1/accounts/", Controller: "api/v1/accounts#create", Source: "routes.rb:47"},
|
||||
{Method: "GET", Path: "/api/v1/accounts/:account_id", Controller: "api/v1/accounts#show", Source: "routes.rb:47"},
|
||||
|
||||
Reference in New Issue
Block a user