You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
665 B

use axum::{
extract::State,
response::Response,
routing::{get, patch},
Extension, Form, Router,
};
use std::sync::Arc;
use crate::data::{AppState, UserForm, UserSession};
pub fn get_selfservice_routes() -> Router<Arc<AppState>> {
Router::new()
.route("/", get(|| async { "" }).post(|| async { "" }))
.route("/:name", patch(|| async { "" }).delete(|| async { "" }))
}
pub fn get_admin_routes() -> Router<Arc<AppState>> {
Router::new()
}
pub async fn create(
State(state): State<Arc<AppState>>,
Extension(user_session): Extension<Option<UserSession>>,
Form(form): Form<UserForm>,
) -> Response {
todo!()
}