forked from TWS/kalkutago
Compare commits
11 commits
f6fb736ff7
...
4fb02e704c
Author | SHA1 | Date | |
---|---|---|---|
|
4fb02e704c | ||
|
b4d524dccb | ||
|
01004e237b | ||
|
149a936638 | ||
|
cf8380db35 | ||
|
7ffc176698 | ||
|
d8c9594d92 | ||
|
88b58bb19d | ||
|
a8a23ff740 | ||
|
17013a0643 | ||
|
396ed28079 |
|
@ -69,12 +69,6 @@ pub(super) async fn sign_up(
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[delete("/")]
|
||||
pub(super) async fn sign_out(cookies: &CookieJar<'_>) {
|
||||
cookies.remove_private(Cookie::named("user"));
|
||||
cookies.remove(Cookie::named("name"));
|
||||
}
|
||||
|
||||
/// Authentication guard
|
||||
#[derive(Deref)]
|
||||
pub(super) struct Auth(users::Model);
|
||||
|
|
|
@ -114,7 +114,7 @@ pub fn start_server(db: DatabaseConnection) -> Rocket<Build> {
|
|||
"/api/v1/groups",
|
||||
routes![all_groups, group, insert_group, update_group, delete_group],
|
||||
)
|
||||
.mount("/api/v1/auth", routes![auth::login, auth::sign_up, auth::sign_out])
|
||||
.mount("/api/v1/auth", routes![auth::login, auth::sign_up])
|
||||
.mount("/", FileServer::from("/src/public"));
|
||||
|
||||
#[cfg(feature = "unsafe_import")]
|
||||
|
|
Loading…
Reference in a new issue