Needs a lot of work
This commit is contained in:
@@ -1,24 +1,11 @@
|
||||
// (Server only) Routes
|
||||
use crate::{
|
||||
endpoints::{MATCH, USER},
|
||||
entity::{game, user},
|
||||
};
|
||||
use axum::{
|
||||
extract::Json,
|
||||
routing::{post, Router},
|
||||
};
|
||||
use crate::endpoints::{LOGIN, LOGIN_TEST};
|
||||
use axum::routing::{post, Router};
|
||||
|
||||
use super::auth::login::{post_login_user, post_test_login};
|
||||
|
||||
pub fn register_routes(app: Router) -> Router {
|
||||
let app = app.route(USER, post(post_user));
|
||||
app.route(MATCH, post(post_match))
|
||||
}
|
||||
|
||||
async fn post_user(_user: String) -> Json<user::Model> {
|
||||
// Update the store with the new match
|
||||
todo!()
|
||||
}
|
||||
|
||||
async fn post_match(_user: String) -> Json<game::Model> {
|
||||
// Update the store with the new match
|
||||
todo!()
|
||||
let app = app.route(LOGIN, post(post_login_user));
|
||||
let app = app.route(LOGIN_TEST, post(post_test_login));
|
||||
app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user