diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2024-10-22 23:25:24 -0400 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2024-10-22 23:25:24 -0400 |
| commit | 01f9f3549c76702fd56e58d44c5180fecddb4bfa (patch) | |
| tree | e7a64e70975a8b50bc442d28c17161b82c42c63a /src/ui/routes/get.rs | |
| parent | 214a9e6c1fd729fc2c49eb2a5d41b5651ff5bc61 (diff) | |
Sort out the naming of the various parts of an identity.
* A `cookie::Identity` (`IdentityCookie`) is a specialized CookieJar for working with identities.
* An `Identity` is a token/login pair.
I hope for this to be a bit more legible.
In service of this, `Login` is no longer extractable. You have to get an identity.
Diffstat (limited to 'src/ui/routes/get.rs')
| -rw-r--r-- | src/ui/routes/get.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/routes/get.rs b/src/ui/routes/get.rs index 97737e1..2fcb51c 100644 --- a/src/ui/routes/get.rs +++ b/src/ui/routes/get.rs @@ -2,12 +2,12 @@ use axum::response::{self, IntoResponse, Redirect}; use crate::{ error::Internal, - login::Login, + token::extract::Identity, ui::assets::{Asset, Assets}, }; -pub async fn handler(login: Option<Login>) -> Result<Asset, Error> { - login.ok_or(Error::NotLoggedIn)?; +pub async fn handler(identity: Option<Identity>) -> Result<Asset, Error> { + let _ = identity.ok_or(Error::NotLoggedIn)?; Assets::index().map_err(Error::Internal) } |
