mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-14 04:37:00 +00:00
Move and rename 'token' to 'access_token' where applicable.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
61cbd38284
commit
b3a47566ff
5 files changed
+69
-56
No files matched your search
@@ -110,7 +110,7 @@ pub(crate) async fn login_route(
|
||||
} else {
|
||||
services
|
||||
.users
|
||||
.set_token(&user_id, &device_id, &access_token)
|
||||
.set_access_token(&user_id, &device_id, &access_token)
|
||||
.await?;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,13 @@ pub(super) async fn auth(
|
||||
};
|
||||
|
||||
let token = if let Some(token) = token {
|
||||
match services.appservice.find_from_token(token).await {
|
||||
match services
|
||||
.appservice
|
||||
.find_from_access_token(token)
|
||||
.await
|
||||
{
|
||||
| Some(reg_info) => Token::Appservice(Box::new(reg_info)),
|
||||
| _ => match services.users.find_from_token(token).await {
|
||||
| _ => match services.users.find_from_access_token(token).await {
|
||||
| Ok((user_id, device_id)) => Token::User((user_id, device_id)),
|
||||
| _ => Token::Invalid,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user