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