mirror of
https://github.com/v0l/route96.git
synced 2025-06-17 00:28:50 +00:00
feat: admin list
This commit is contained in:
@ -18,7 +18,7 @@ impl<'r> FromRequest<'r> for Nip98Auth {
|
||||
type Error = &'static str;
|
||||
|
||||
async fn from_request(request: &'r Request<'_>) -> Outcome<Self, Self::Error> {
|
||||
return if let Some(auth) = request.headers().get_one("authorization") {
|
||||
if let Some(auth) = request.headers().get_one("authorization") {
|
||||
if auth.starts_with("Nostr ") {
|
||||
let event = if let Ok(j) = BASE64_STANDARD.decode(&auth[6..]) {
|
||||
if let Ok(ev) = Event::from_json(j) {
|
||||
@ -103,6 +103,6 @@ impl<'r> FromRequest<'r> for Nip98Auth {
|
||||
}
|
||||
} else {
|
||||
Outcome::Error((Status::new(403), "Auth header not found"))
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user