mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-28 10:29:30 +02:00
clippy: adhere to pedantic clippy, uniform test error handling
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
use axum::{extract::State, response::IntoResponse, Extension, Json};
|
||||
use common::storage::types::user::User;
|
||||
|
||||
use crate::{api_state::ApiState, error::ApiError};
|
||||
use crate::{api_state::ApiState, error::ApiErr};
|
||||
|
||||
pub async fn get_categories(
|
||||
pub async fn list(
|
||||
State(state): State<ApiState>,
|
||||
Extension(user): Extension<User>,
|
||||
) -> Result<impl IntoResponse, ApiError> {
|
||||
) -> Result<impl IntoResponse, ApiErr> {
|
||||
let categories = User::get_user_categories(&user.id, &state.db).await?;
|
||||
|
||||
Ok(Json(categories))
|
||||
|
||||
@@ -13,7 +13,7 @@ use serde_json::json;
|
||||
use tempfile::NamedTempFile;
|
||||
use tracing::info;
|
||||
|
||||
use crate::{api_state::ApiState, error::ApiError};
|
||||
use crate::{api_state::ApiState, error::ApiErr};
|
||||
|
||||
#[derive(Debug, TryFromMultipart)]
|
||||
pub struct IngestParams {
|
||||
|
||||
Reference in New Issue
Block a user