1
0
Fork 0
forked from TWS/kalkutago

Compare commits

..

11 commits

Author SHA1 Message Date
D. Scott Boggs
4fb02e704c add tests 2023-08-10 10:39:37 -04:00
D. Scott Boggs
b4d524dccb Remove no-longer-existing Rust feature default_free_fn 2023-07-20 07:39:46 -04:00
D. Scott Boggs
01004e237b Fix authenticated track insertion 2023-06-27 14:20:43 -04:00
D. Scott Boggs
149a936638 Rename user -> users 2023-06-27 14:18:07 -04:00
D. Scott Boggs
cf8380db35 tracks are now relative to an authenticated user 2023-06-27 06:12:45 -04:00
D. Scott Boggs
7ffc176698 Add entity and relations for user-tracks relationship 2023-06-27 06:12:45 -04:00
D. Scott Boggs
d8c9594d92 Add users-to-tracks many-to-many association 2023-06-27 06:12:45 -04:00
D. Scott Boggs
88b58bb19d Add login+sign_up routes and auth guard 2023-06-27 06:12:45 -04:00
D. Scott Boggs
a8a23ff740 Add support for rocket's "secret cookies" 2023-06-27 06:12:45 -04:00
D. Scott Boggs
17013a0643 Add user model 2023-06-27 06:12:45 -04:00
scott
396ed28079 Merge pull request 'Client feature: Add Login view' (#2) from frontend/feature/login-view into feature/user-auth
Reviewed-on: https://git.tams.tech/scott/kalkutago/pulls/2
2023-06-27 10:07:18 +00:00
2 changed files with 1 additions and 7 deletions

View file

@ -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);

View file

@ -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")]