routes, new_user route

This commit is contained in:
Julia Lange 2026-03-03 11:33:46 -08:00
parent 92763fd7dc
commit 949a984d0c
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
2 changed files with 51 additions and 1 deletions

View file

@ -1,9 +1,18 @@
use serde::Serialize;
use serde_json::json;
use axum::{Json, Router, response::IntoResponse, routing::get};
use axum::{
Json,
Router,
response::IntoResponse,
routing::{
get,
post,
},
};
use reqwest::StatusCode;
mod get_users;
mod new_user;
use crate::AppState;
@ -20,6 +29,7 @@ pub struct ApiError {
pub fn router() -> Router<AppState> {
Router::new()
.route("/get_users", get(get_users::handler))
.route("/new_user", post(new_user::handler))
}
impl IntoResponse for ApiError {