Module rename.
This commit is contained in:
+1
-1
@@ -2,11 +2,11 @@ use anyhow::Context;
|
|||||||
use sqlx::postgres::PgPoolOptions;
|
use sqlx::postgres::PgPoolOptions;
|
||||||
use tokio::net::TcpListener;
|
use tokio::net::TcpListener;
|
||||||
|
|
||||||
|
mod app;
|
||||||
mod config;
|
mod config;
|
||||||
mod crypto;
|
mod crypto;
|
||||||
mod database;
|
mod database;
|
||||||
mod domain;
|
mod domain;
|
||||||
mod error;
|
|
||||||
mod repository;
|
mod repository;
|
||||||
mod routes;
|
mod routes;
|
||||||
mod state;
|
mod state;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use axum::{http::StatusCode, routing::get};
|
use axum::{http::StatusCode, routing::get};
|
||||||
|
|
||||||
use crate::{error::AppError, state::AppState};
|
use crate::{app::AppError, state::AppState};
|
||||||
|
|
||||||
mod account_members;
|
mod account_members;
|
||||||
mod accounts;
|
mod accounts;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use super::{
|
|||||||
dtos::account_member::{AccountMemberRequest, AccountMemberResponse},
|
dtos::account_member::{AccountMemberRequest, AccountMemberResponse},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{domain, error::AppError, repository};
|
use crate::{app::AppError, domain, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use super::{
|
|||||||
dtos::account::{AccountRequest, AccountResponse},
|
dtos::account::{AccountRequest, AccountResponse},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{domain::AccountMember, error::AppError, repository};
|
use crate::{app::AppError, domain::AccountMember, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use axum::routing::post;
|
use axum::routing::post;
|
||||||
|
|
||||||
use crate::{error::AppError, state::AppState};
|
use crate::{app::AppError, state::AppState};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<AppState> {
|
pub fn create_router() -> axum::Router<AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ use axum::{extract::State, routing::post};
|
|||||||
use sqlx::PgPool;
|
use sqlx::PgPool;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
app::AppError,
|
||||||
config::TokenConfig,
|
config::TokenConfig,
|
||||||
domain::{AccessToken, Secret},
|
domain::{AccessToken, Secret},
|
||||||
error::AppError,
|
|
||||||
repository,
|
repository,
|
||||||
routes::{
|
routes::{
|
||||||
dtos::token::{TokenRequest, TokenResponse, TokenRevocationRequest},
|
dtos::token::{TokenRequest, TokenResponse, TokenRevocationRequest},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use axum::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use super::extractors::{AuthError, AuthHeaderError, BearerError, ExtractorError};
|
use super::extractors::{AuthError, AuthHeaderError, BearerError, ExtractorError};
|
||||||
use crate::{domain::DomainError, error::AppError, repository::RepositoryError};
|
use crate::{app::AppError, domain::DomainError, repository::RepositoryError};
|
||||||
|
|
||||||
impl IntoResponse for AppError {
|
impl IntoResponse for AppError {
|
||||||
fn into_response(self) -> Response {
|
fn into_response(self) -> Response {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use axum::response::IntoResponse;
|
use axum::response::IntoResponse;
|
||||||
|
|
||||||
use crate::error::AppError;
|
use crate::app::AppError;
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
mod form;
|
mod form;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ use super::{
|
|||||||
},
|
},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{domain, error::AppError, repository};
|
use crate::{app::AppError, domain, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use super::{
|
|||||||
dtos::transaction::{TransactionRequest, TransactionResponse},
|
dtos::transaction::{TransactionRequest, TransactionResponse},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{domain, error::AppError, repository};
|
use crate::{app::AppError, domain, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ use super::{
|
|||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
|
app::AppError,
|
||||||
crypto::{generate_secret, hash_secret},
|
crypto::{generate_secret, hash_secret},
|
||||||
error::AppError,
|
|
||||||
repository,
|
repository,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use super::{
|
|||||||
dtos::user_app::{UserAppRequest, UserAppResponse},
|
dtos::user_app::{UserAppRequest, UserAppResponse},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{error::AppError, repository};
|
use crate::{app::AppError, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use super::{
|
|||||||
dtos::user::{UserRequest, UserResponse},
|
dtos::user::{UserRequest, UserResponse},
|
||||||
extractors::{Auth, Json, Path, Query},
|
extractors::{Auth, Json, Path, Query},
|
||||||
};
|
};
|
||||||
use crate::{error::AppError, repository};
|
use crate::{app::AppError, repository};
|
||||||
|
|
||||||
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
pub fn create_router() -> axum::Router<crate::state::AppState> {
|
||||||
axum::Router::new()
|
axum::Router::new()
|
||||||
|
|||||||
Reference in New Issue
Block a user