Added ownership and app existence validation to the user app secrets routes.

This commit is contained in:
2026-10-09 12:11:42 +02:00
parent 381c229bd4
commit e68f103c29
11 changed files with 129 additions and 37 deletions
+12
View File
@@ -58,6 +58,18 @@ where
Ok(app)
}
pub async fn find_owner_by_id<'e, E>(
executor: E,
app_id: Uuid,
) -> Result<Option<Uuid>, RepositoryError>
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,
{
let owner = db::find_owner_by_id(executor, app_id).await?;
Ok(owner)
}
pub async fn upsert<'e, E>(executor: E, app: UserApp) -> Result<Upsert<UserApp>, RepositoryError>
where
E: sqlx::Executor<'e, Database = sqlx::Postgres>,