fix(oauth2): use public bot
This commit is contained in:
@@ -125,10 +125,6 @@ pub fn scope_can_access_route(scope: &str, request: &Request<'_>) -> bool {
|
||||
|
||||
match scope {
|
||||
"identify" => {
|
||||
println!("{:?}", request.method() == Method::Get);
|
||||
println!("{:?}", segments.get(0));
|
||||
println!("{:?}", segments.get(1));
|
||||
|
||||
request.method() == Method::Get &&
|
||||
segments.get(0) == Some("users") &&
|
||||
segments.get(1) == Some("@me")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::v0::{Bot, User};
|
||||
use crate::v0::{PublicBot, User};
|
||||
|
||||
auto_derived!(
|
||||
pub struct OAuth2AuthorizeAuthResponse {
|
||||
@@ -7,7 +7,7 @@ auto_derived!(
|
||||
}
|
||||
|
||||
pub struct OAuth2AuthorizeInfoResponse {
|
||||
pub bot: Bot,
|
||||
pub bot: PublicBot,
|
||||
pub user: User,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user