feat(labrinth): route to update subscriptions for archon (#6811)

* feat(labrinth): add /_internal/billing/subscriptions/manager/update_many

* chore: fixes

* chore: clippy

* chore: fixes
This commit is contained in:
François-Xavier Talbot
2026-07-22 16:18:08 +00:00
committed by GitHub
parent 07fd4fae5f
commit 96e2d95d02
8 changed files with 156 additions and 20 deletions
@@ -1,4 +1,3 @@
use crate::database::PgTransaction;
use crate::database::models::{
DBProductPriceId, DBUserId, DBUserSubscriptionId, DatabaseError,
};
@@ -131,7 +130,7 @@ impl DBUserSubscription {
pub async fn upsert(
&self,
transaction: &mut PgTransaction<'_>,
exec: impl crate::database::Executor<'_, Database = sqlx::Postgres>,
) -> Result<(), DatabaseError> {
sqlx::query!(
"
@@ -156,7 +155,7 @@ impl DBUserSubscription {
self.status.as_str(),
serde_json::to_value(&self.metadata)?,
)
.execute(&mut *transaction)
.execute(exec)
.await?;
Ok(())