feat: add client self-service purchases and integration kit
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
@@ -42,6 +42,8 @@ func operation(path string) string {
|
||||
return "payment_checkout"
|
||||
case "/api/v1/payments/:channel/notify":
|
||||
return "payment_notify"
|
||||
case "/api/v1/client/plans", "/api/v1/client/purchases", "/api/v1/client/purchases/status", "/api/v1/client/purchases/claim":
|
||||
return "client_purchase"
|
||||
case "/api/v1/portal/snapshot":
|
||||
return "login"
|
||||
case "/api/v1/auth/login":
|
||||
@@ -121,11 +123,14 @@ func (o *Operations) Middleware() gin.HandlerFunc {
|
||||
c.Abort()
|
||||
}
|
||||
}()
|
||||
if op == "login" || op == "activation" || op == "heartbeat" || op == "download" || op == "payment_checkout" || op == "payment_notify" {
|
||||
if op == "login" || op == "activation" || op == "heartbeat" || op == "download" || op == "payment_checkout" || op == "payment_notify" || op == "client_purchase" {
|
||||
limit := 60
|
||||
if op == "payment_notify" {
|
||||
limit = 600
|
||||
}
|
||||
if op == "client_purchase" {
|
||||
limit = 60
|
||||
}
|
||||
if op == "login" {
|
||||
limit = 10
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user