summaryrefslogtreecommitdiff
path: root/src/ui/routes/ch/channel.rs
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2024-10-22 23:25:24 -0400
committerOwen Jacobson <owen@grimoire.ca>2024-10-22 23:25:24 -0400
commit01f9f3549c76702fd56e58d44c5180fecddb4bfa (patch)
treee7a64e70975a8b50bc442d28c17161b82c42c63a /src/ui/routes/ch/channel.rs
parent214a9e6c1fd729fc2c49eb2a5d41b5651ff5bc61 (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/ch/channel.rs')
-rw-r--r--src/ui/routes/ch/channel.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/routes/ch/channel.rs b/src/ui/routes/ch/channel.rs
index 353d000..a338f1f 100644
--- a/src/ui/routes/ch/channel.rs
+++ b/src/ui/routes/ch/channel.rs
@@ -8,7 +8,7 @@ pub mod get {
app::App,
channel,
error::Internal,
- login::Login,
+ token::extract::Identity,
ui::{
assets::{Asset, Assets},
error::NotFound,
@@ -17,10 +17,10 @@ pub mod get {
pub async fn handler(
State(app): State<App>,
- login: Option<Login>,
+ identity: Option<Identity>,
Path(channel): Path<channel::Id>,
) -> Result<Asset, Error> {
- login.ok_or(Error::NotLoggedIn)?;
+ let _ = identity.ok_or(Error::NotLoggedIn)?;
app.channels()
.get(&channel)
.await