feat: v2 rewrite — hexagonal arch, ActivityPub federation, NATS, deployment-ready #1

Merged
GKaszewski merged 334 commits from v2 into master 2026-05-16 09:42:43 +00:00
Showing only changes of commit 706d7389ed - Show all commits

View File

@@ -9,7 +9,9 @@ use api_types::{
responses::{ErrorResponse, ProfileField, RemoteActorResponse, UserResponse},
};
use application::use_cases::feed::list_users;
use application::use_cases::profile::{get_user_by_id_or_username, update_profile};
use application::use_cases::profile::{
get_user as fetch_user, get_user_by_id_or_username, update_profile,
};
use application::use_cases::search::search_users;
use axum::{
extract::{Path, Query, State},
@@ -78,11 +80,7 @@ pub async fn patch_profile(
body.custom_css,
)
.await?;
let user = s
.users
.find_by_id(&uid)
.await?
.ok_or(domain::errors::DomainError::NotFound)?;
let user = fetch_user(&*s.users, &uid).await?;
Ok(Json(to_user_response(&user)))
}
@@ -98,11 +96,7 @@ pub async fn get_me(
State(s): State<AppState>,
AuthUser(uid): AuthUser,
) -> Result<Json<UserResponse>, ApiError> {
let user = s
.users
.find_by_id(&uid)
.await?
.ok_or(domain::errors::DomainError::NotFound)?;
let user = fetch_user(&*s.users, &uid).await?;
Ok(Json(to_user_response(&user)))
}