Begining of a RON API to edit profile
This commit is contained in:
parent
37f6de7a89
commit
405aa68526
11 changed files with 229 additions and 68 deletions
|
|
@ -4,7 +4,7 @@ use axum::{
|
|||
extract::{ConnectInfo, FromRef, Request, State},
|
||||
middleware::{self, Next},
|
||||
response::{Response, Result},
|
||||
routing::get,
|
||||
routing::{get, post, put},
|
||||
Router,
|
||||
};
|
||||
use axum_extra::extract::cookie::CookieJar;
|
||||
|
|
@ -22,6 +22,7 @@ mod data;
|
|||
mod email;
|
||||
mod hash;
|
||||
mod model;
|
||||
mod ron_extractor;
|
||||
mod services;
|
||||
mod utils;
|
||||
|
||||
|
|
@ -81,7 +82,6 @@ async fn main() {
|
|||
get(services::sign_up_get).post(services::sign_up_post),
|
||||
)
|
||||
.route("/validation", get(services::sign_up_validation))
|
||||
.route("/recipe/view/:id", get(services::view_recipe))
|
||||
.route(
|
||||
"/signin",
|
||||
get(services::sign_in_get).post(services::sign_in_post),
|
||||
|
|
@ -95,6 +95,9 @@ async fn main() {
|
|||
"/reset_password",
|
||||
get(services::reset_password_get).post(services::reset_password_post),
|
||||
)
|
||||
.route("/recipe/view/:id", get(services::view_recipe))
|
||||
// RON API.
|
||||
.route("/user/set_name", put(services::ron_api::set_user_name))
|
||||
.layer(TraceLayer::new_for_http())
|
||||
.route_layer(middleware::from_fn_with_state(
|
||||
state.clone(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue