stub out logout
This commit is contained in:
parent
dbff72330e
commit
5de4b9994c
2 changed files with 10 additions and 1 deletions
|
@ -97,3 +97,11 @@ pub async fn post_login(
|
||||||
pub async fn get_login() -> impl IntoResponse {
|
pub async fn get_login() -> impl IntoResponse {
|
||||||
LoginGet::default()
|
LoginGet::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn get_logout() -> impl IntoResponse {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn post_logout() -> impl IntoResponse {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
||||||
use witch_watch::{
|
use witch_watch::{
|
||||||
db,
|
db,
|
||||||
generic_handlers::{handle_slash, handle_slash_redir},
|
generic_handlers::{handle_slash, handle_slash_redir},
|
||||||
login::{get_login, post_login},
|
login::{get_login, get_logout, post_login, post_logout},
|
||||||
session_store::SqliteSessionStore,
|
session_store::SqliteSessionStore,
|
||||||
signup::{get_create_user, handle_signup_success, post_create_user},
|
signup::{get_create_user, handle_signup_success, post_create_user},
|
||||||
User,
|
User,
|
||||||
|
@ -52,6 +52,7 @@ async fn main() {
|
||||||
get(handle_signup_success).post(handle_signup_success),
|
get(handle_signup_success).post(handle_signup_success),
|
||||||
)
|
)
|
||||||
.route("/login", get(get_login).post(post_login))
|
.route("/login", get(get_login).post(post_login))
|
||||||
|
.route("/logout", get(get_logout).post(post_logout))
|
||||||
.fallback(handle_slash_redir)
|
.fallback(handle_slash_redir)
|
||||||
.layer(auth_layer)
|
.layer(auth_layer)
|
||||||
.layer(session_layer)
|
.layer(session_layer)
|
||||||
|
|
Loading…
Reference in a new issue