Skip to content

Commit

Permalink
refactor: don't use plural in module name
Browse files Browse the repository at this point in the history
  • Loading branch information
azzamsa committed Jul 28, 2023
1 parent 3135e36 commit d5a0b77
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pub mod context;
pub mod db;
pub mod domain;
pub mod driver;
mod errors;
mod error;
pub mod logger;
pub mod relay;
pub mod routes;
pub mod route;
pub mod scalar;
pub mod schema;

pub use errors::Error;
pub use error::Error;
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
};

use axum::Server;
use tin::{config::Config, logger, routes::app};
use tin::{config::Config, logger, route::app};

#[tokio::main]
async fn main() -> Result<(), tin::Error> {
Expand Down
2 changes: 1 addition & 1 deletion src/relay/validation.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use uuid::Uuid;

use crate::{
errors::{
error::{
app::Error::{
MissingFirstAndLastPaginationArguments, PassedFirstAndLastPaginationArguments,
},
Expand Down
6 changes: 3 additions & 3 deletions src/routes.rs → src/route.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
db,
domain::{health, meta, user},
driver::mailer::Mailer,
routes,
route,
schema::{AppSchema, Mutation, Query},
Error,
};
Expand Down Expand Up @@ -77,11 +77,11 @@ pub async fn app() -> Result<Router, Error> {
struct ApiDoc;

let mut app = Router::new()
.route("/graphql", post(routes::graphql_handler))
.route("/graphql", post(route::graphql_handler))
.route("/health", get(health::resolver::health));
if config.env != config::Env::Production {
app = app
.route("/playground", get(routes::graphql_playground))
.route("/playground", get(route::graphql_playground))
.merge(SwaggerUi::new("/swagger").url("/api-doc/openapi.json", ApiDoc::openapi()));
}
let app = app.layer(Extension(schema));
Expand Down
2 changes: 1 addition & 1 deletion tests/health/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::QueryBuilder;
use serde_json::{from_slice, json, to_string, Value};
use tin::routes::app;
use tin::route::app;
use tower::util::ServiceExt;

use super::{graphql::queries::HealthQuery, schema::HealthResponse};
Expand Down
2 changes: 1 addition & 1 deletion tests/meta/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::QueryBuilder;
use serde_json::{from_slice, to_string};
use tin::routes::app;
use tin::route::app;
use tower::util::ServiceExt;

use super::{graphql::queries::MetaQuery, schema::MetaResponse};
Expand Down
2 changes: 1 addition & 1 deletion tests/user/create_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::MutationBuilder;
use serde_json::{from_slice, to_string};
use tin::routes::app;
use tin::route::app;
use tower::util::ServiceExt;

use super::{fake_user, teardown};
Expand Down
2 changes: 1 addition & 1 deletion tests/user/create_user_without_full_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::MutationBuilder;
use serde_json::{from_slice, to_string};
use tin::routes::app;
use tin::route::app;
use tower::util::ServiceExt;

use super::teardown;
Expand Down
2 changes: 1 addition & 1 deletion tests/user/delete_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::{MutationBuilder, QueryBuilder};
use serde_json::{from_slice, to_string, Value};
use tin::routes::app;
use tin::route::app;
use tower::{util::ServiceExt, Service};

use super::{fake_user, teardown};
Expand Down
2 changes: 1 addition & 1 deletion tests/user/duplicate_username.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::MutationBuilder;
use serde_json::{from_slice, to_string, Value};
use tin::routes::app;
use tin::route::app;
use tower::{util::ServiceExt, Service};

use super::{fake_user, graphql::update, teardown};
Expand Down
2 changes: 1 addition & 1 deletion tests/user/find_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::QueryBuilder;
use serde_json::{from_slice, to_string, Value};
use tin::routes::app;
use tin::route::app;
use tower::util::ServiceExt;

use super::graphql::queries::{ReadUserArguments, UserQuery, Uuid};
Expand Down
2 changes: 1 addition & 1 deletion tests/user/keep_existing_full_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::MutationBuilder;
use serde_json::{from_slice, to_string};
use tin::routes::app;
use tin::route::app;
use tower::{util::ServiceExt, Service};

use crate::fake_user;
Expand Down
2 changes: 1 addition & 1 deletion tests/user/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::{MutationBuilder, QueryBuilder};
use serde_json::{from_slice, to_string, Value};
use tin::routes::app;
use tin::route::app;
use tower::{util::ServiceExt, Service};

use super::teardown;
Expand Down
2 changes: 1 addition & 1 deletion tests/user/update_user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use axum::{
};
use cynic::MutationBuilder;
use serde_json::{from_slice, to_string};
use tin::routes::app;
use tin::route::app;
use tower::{util::ServiceExt, Service};

use super::{fake_user, graphql::update::Uuid, teardown};
Expand Down

0 comments on commit d5a0b77

Please sign in to comment.