Group subscription items by price
Docker / build-and-push-image (backend, backend, coracle/caravel-backend) (push) Failing after 4m45s
Docker / build-and-push-image (frontend, frontend, coracle/caravel-frontend) (push) Successful in 2m45s

This commit is contained in:
Jon Staab
2026-05-12 15:53:17 -07:00
parent 679a56edc3
commit c9c1dd2c4c
6 changed files with 316 additions and 211 deletions
-11
View File
@@ -184,17 +184,6 @@ impl Query {
Ok(bolt11)
}
pub async fn has_active_paid_relays(&self, tenant_id: &str) -> Result<bool> {
let plans = sqlx::query_scalar::<_, String>(
"SELECT plan FROM relay WHERE tenant = ? AND status = 'active'",
)
.bind(tenant_id)
.fetch_all(&self.pool)
.await?;
Ok(plans.into_iter().any(|plan| Self::is_paid_plan(&plan)))
}
pub async fn list_activity_for_relay(&self, relay_id: &str) -> Result<Vec<Activity>> {
let rows = sqlx::query_as::<_, Activity>(
"SELECT id, tenant, created_at, activity_type, resource_type, resource_id