Repo/db fn name refactor.
This commit is contained in:
@@ -61,7 +61,7 @@ async fn get_user_app(
|
||||
State(pool): State<PgPool>,
|
||||
Path((user_id, app_id)): Path<(Uuid, Uuid)>,
|
||||
) -> Result<Json<UserAppResponse>, AppError> {
|
||||
let app = repository::user_apps::get(&pool, user_id, app_id)
|
||||
let app = repository::user_apps::get_by_id(&pool, user_id, app_id)
|
||||
.await?
|
||||
.ok_or(AppError::NotFound)?;
|
||||
|
||||
@@ -92,7 +92,7 @@ async fn delete_user_app(
|
||||
State(pool): State<PgPool>,
|
||||
Path((user_id, app_id)): Path<(Uuid, Uuid)>,
|
||||
) -> Result<StatusCode, AppError> {
|
||||
match repository::user_apps::delete(&pool, user_id, app_id).await? {
|
||||
match repository::user_apps::delete_by_id(&pool, user_id, app_id).await? {
|
||||
Delete::Deleted => Ok(StatusCode::NO_CONTENT),
|
||||
Delete::NotFound => Err(AppError::NotFound),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user