Add basic register and login
All checks were successful
Build Crate / build (push) Successful in 1m45s

This commit is contained in:
2024-08-28 16:53:08 -04:00
parent f4f491085d
commit 5af626b746
23 changed files with 397 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
// (Server only) Routes
use crate::endpoints::{FORGOT_PASSWORD, LOGIN, LOGIN_TEST};
use crate::endpoints::{FORGOT_PASSWORD, LOGIN, LOGIN_TEST, REGISTER};
use axum::routing::{post, Router};
use futures::executor::block_on;
use sea_orm::Database;
@@ -8,12 +8,14 @@ use super::{
auth::{
forgot_password::post_forgot_password,
login::{post_login_user, post_test_login},
register::post_register_user,
},
server_state::ServerState,
};
pub fn get_api_router(state: ServerState) -> Router {
Router::new()
.route(REGISTER, post(post_register_user))
.route(LOGIN, post(post_login_user))
.route(LOGIN_TEST, post(post_test_login))
.route(FORGOT_PASSWORD, post(post_forgot_password))