mirror of
https://github.com/modrinth/code.git
synced 2026-08-26 17:44:50 +00:00
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:
@@ -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(())
|
||||
|
||||
Reference in New Issue
Block a user