These errors have become app level errors.
This commit is contained in:
@@ -13,7 +13,7 @@ use crate::{
|
||||
crypto::{generate_secret, hash_secret},
|
||||
domain::UserAppSecret,
|
||||
error::AppError,
|
||||
repository::{self, ReferenceRelation, RepositoryError},
|
||||
repository::{self, RepositoryError},
|
||||
};
|
||||
|
||||
pub fn create_router() -> axum::Router<PgPool> {
|
||||
@@ -141,9 +141,6 @@ async fn ensure_app_ownership(
|
||||
) -> Result<(), AppError> {
|
||||
match repository::user_apps::find_owner_by_id(&mut *connection, app_id).await? {
|
||||
Some(owner) if owner == user_id => Ok(()),
|
||||
Some(_) | None => Err(RepositoryError::NotFound {
|
||||
relation: ReferenceRelation::UserApp,
|
||||
}
|
||||
.into()),
|
||||
Some(_) | None => Err(AppError::NotFound).into(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user