got nested routing working
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
use crate::state::AppState;
|
||||
|
||||
pub(super) use super::*;
|
||||
|
||||
pub mod signup;
|
||||
|
||||
pub const AUTH_TAG: &str = "auth";
|
||||
|
||||
pub fn router(state: AppState) -> OpenApiRouter {
|
||||
OpenApiRouter::new()
|
||||
.routes(routes!(signup::signup))
|
||||
.with_state(state)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
use axum::{extract::State, response::Response};
|
||||
|
||||
use crate::state::AppState;
|
||||
|
||||
use super::*;
|
||||
|
||||
// /// Get customer
|
||||
// ///
|
||||
// /// Just return a static Customer object
|
||||
// #[utoipa::path(get, path = "", responses((status = OK, body = Customer)), tag = super::CUSTOMER_TAG)]
|
||||
// pub async fn signup() -> Json<Customer> {}
|
||||
/// Sign up
|
||||
#[utoipa::path(get, path = "/signup", responses((status = OK, body = String)), tag = super::AUTH_TAG)]
|
||||
pub async fn signup(State(state): State<AppState>) -> Response<String> {
|
||||
Response::new("Hello, World!".to_string())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user