refactor: Upload extractor, 429 refusal test, stricter contract test

This commit is contained in:
2026-10-25 21:59:31 +01:00
parent c8d9138349
commit 2ac1d4e0cf
10 changed files with 139 additions and 52 deletions

View File

@@ -1,15 +1,10 @@
use crate::extractors::Body;
use crate::extractors::{Body, Upload};
use crate::{errors::ApiError, extractors::AuthenticatedUser, state::AppState};
use api_types::{ProfileResponse, UserSummaryDto, UsersResponse};
use application::users::{
get_users, queries::GetUsersQuery, update_profile, update_profile_fields,
};
use axum::{
Json,
extract::{Multipart, State},
http::StatusCode,
response::IntoResponse,
};
use axum::{Json, extract::State, http::StatusCode, response::IntoResponse};
#[utoipa::path(
get, path = "/api/v1/profile",
@@ -66,7 +61,7 @@ pub async fn get_profile(
pub async fn update_profile_handler(
State(state): State<AppState>,
AuthenticatedUser(user_id): AuthenticatedUser,
multipart: Multipart,
Upload(multipart): Upload,
) -> impl IntoResponse {
let data = crate::support::parse_profile_multipart(multipart).await;