Add /auth/status

This commit is contained in:
2022-09-18 15:04:33 +00:00
committed by GitHub
parent 35935e80a4
commit b00d326044
11 changed files with 88 additions and 19 deletions

View File

@@ -1,15 +1,4 @@
use super::context::ServerContext;
use super::route::ResponseForType;
use super::traits::MatchRoute;
use super::traits::ResponseJsonFor;
use crate::error::PixivDownloaderError;
use hyper::Body;
use hyper::Request;
use hyper::Response;
use json::JsonValue;
use proc_macros::filter_http_methods;
use regex::Regex;
use std::sync::Arc;
use super::preclude::*;
pub struct VersionContext {
ctx: Arc<ServerContext>,
@@ -32,7 +21,7 @@ impl ResponseJsonFor<Body> for VersionContext {
json::object! {},
true,
self.ctx,
allow_headers = [CONTENT_TYPE, X_TOKEN],
allow_headers = [CONTENT_TYPE],
GET,
OPTIONS,
POST,