Skip to content

Commit f81227f

Browse files
update permutive proxy with new route helpers
1 parent 5e2aed7 commit f81227f

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

crates/common/src/integrations/permutive.rs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -533,24 +533,28 @@ pub fn register(settings: &Settings) -> Option<IntegrationRegistration> {
533533

534534
#[async_trait(?Send)]
535535
impl IntegrationProxy for PermutiveIntegration {
536+
fn integration_name(&self) -> &'static str {
537+
PERMUTIVE_INTEGRATION_ID
538+
}
539+
536540
fn routes(&self) -> Vec<IntegrationEndpoint> {
537541
vec![
538542
// API proxy endpoints
539-
IntegrationEndpoint::get("/integrations/permutive/api/*"),
540-
IntegrationEndpoint::post("/integrations/permutive/api/*"),
543+
self.get("/api/*"),
544+
self.post("/api/*"),
541545
// Secure Signals endpoints
542-
IntegrationEndpoint::get("/integrations/permutive/secure-signal/*"),
543-
IntegrationEndpoint::post("/integrations/permutive/secure-signal/*"),
546+
self.get("/secure-signal/*"),
547+
self.post("/secure-signal/*"),
544548
// Events endpoints
545-
IntegrationEndpoint::get("/integrations/permutive/events/*"),
546-
IntegrationEndpoint::post("/integrations/permutive/events/*"),
549+
self.get("/events/*"),
550+
self.post("/events/*"),
547551
// Sync endpoints
548-
IntegrationEndpoint::get("/integrations/permutive/sync/*"),
549-
IntegrationEndpoint::post("/integrations/permutive/sync/*"),
552+
self.get("/sync/*"),
553+
self.post("/sync/*"),
550554
// CDN endpoint
551-
IntegrationEndpoint::get("/integrations/permutive/cdn/*"),
555+
self.get("/cdn/*"),
552556
// SDK serving
553-
IntegrationEndpoint::get("/integrations/permutive/sdk"),
557+
self.get("/sdk"),
554558
]
555559
}
556560

0 commit comments

Comments
 (0)