chore: format code
parent
e8e0c94937
commit
68b2b1beb4
|
@ -6,8 +6,8 @@ use std::path::PathBuf;
|
|||
|
||||
use clap::{Args, Parser, Subcommand, ValueEnum};
|
||||
use figment::{
|
||||
providers::{Env, Format, Serialized, Toml},
|
||||
Figment,
|
||||
providers::{Env, Format, Serialized, Toml},
|
||||
};
|
||||
use serde::Serialize;
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
use axum::{
|
||||
Router,
|
||||
extract::{Path, State},
|
||||
routing::post,
|
||||
Router,
|
||||
};
|
||||
use axum_extra::{
|
||||
extract::{cookie::Cookie, CookieJar},
|
||||
headers::{authorization::Basic, Authorization, UserAgent},
|
||||
TypedHeader,
|
||||
extract::{CookieJar, cookie::Cookie},
|
||||
headers::{Authorization, UserAgent, authorization::Basic},
|
||||
};
|
||||
use cookie::time::Duration;
|
||||
use gpodder::AuthErr;
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::SESSION_ID_COOKIE,
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router() -> Router<Context> {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
use axum::{
|
||||
Extension, Json, Router,
|
||||
extract::{Path, State},
|
||||
middleware,
|
||||
routing::{get, post},
|
||||
Extension, Json, Router,
|
||||
};
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::{
|
||||
auth_api_middleware,
|
||||
format::{Format, StringWithFormat},
|
||||
models,
|
||||
},
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router(ctx: Context) -> Router<Context> {
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
use axum::{
|
||||
Extension, Json, Router,
|
||||
extract::{Path, Query, State},
|
||||
middleware,
|
||||
routing::post,
|
||||
Extension, Json, Router,
|
||||
};
|
||||
use chrono::DateTime;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::{
|
||||
auth_api_middleware,
|
||||
|
@ -15,7 +16,6 @@ use crate::server::{
|
|||
models,
|
||||
models::UpdatedUrlsResponse,
|
||||
},
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router(ctx: Context) -> Router<Context> {
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
use axum::{
|
||||
Extension, Json, Router,
|
||||
extract::{Path, Query, State},
|
||||
middleware,
|
||||
routing::post,
|
||||
Extension, Json, Router,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::{
|
||||
auth_api_middleware,
|
||||
format::{Format, StringWithFormat},
|
||||
models::{SubscriptionDelta, SubscriptionDeltaResponse, UpdatedUrlsResponse},
|
||||
},
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router(ctx: Context) -> Router<Context> {
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
use axum::{
|
||||
Extension, Json, Router,
|
||||
extract::{Path, State},
|
||||
middleware,
|
||||
routing::get,
|
||||
Extension, Json, Router,
|
||||
};
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::{
|
||||
auth_api_middleware,
|
||||
format::{Format, StringWithFormat},
|
||||
models::{SyncStatus, SyncStatusDelta},
|
||||
},
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router(ctx: Context) -> Router<Context> {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use std::ops::Deref;
|
||||
|
||||
use serde::{
|
||||
de::{value::StrDeserializer, Visitor},
|
||||
Deserialize,
|
||||
de::{Visitor, value::StrDeserializer},
|
||||
};
|
||||
|
||||
#[derive(Deserialize, Debug, PartialEq, Eq)]
|
||||
|
|
|
@ -4,16 +4,16 @@ mod models;
|
|||
mod simple;
|
||||
|
||||
use axum::{
|
||||
RequestExt, Router,
|
||||
extract::{Request, State},
|
||||
http::{header::WWW_AUTHENTICATE, HeaderName, HeaderValue, StatusCode},
|
||||
http::{HeaderName, HeaderValue, StatusCode, header::WWW_AUTHENTICATE},
|
||||
middleware::Next,
|
||||
response::{IntoResponse, Response},
|
||||
RequestExt, Router,
|
||||
};
|
||||
use axum_extra::{
|
||||
extract::{cookie::Cookie, CookieJar},
|
||||
headers::{authorization::Basic, Authorization},
|
||||
TypedHeader,
|
||||
extract::{CookieJar, cookie::Cookie},
|
||||
headers::{Authorization, authorization::Basic},
|
||||
};
|
||||
use tower_http::set_header::SetResponseHeaderLayer;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
use axum::{
|
||||
Extension, Json, Router,
|
||||
extract::{Path, State},
|
||||
middleware,
|
||||
routing::get,
|
||||
Extension, Json, Router,
|
||||
};
|
||||
|
||||
use crate::server::{
|
||||
Context,
|
||||
error::{AppError, AppResult},
|
||||
gpodder::{auth_api_middleware, format::StringWithFormat},
|
||||
Context,
|
||||
};
|
||||
|
||||
pub fn router(ctx: Context) -> Router<Context> {
|
||||
|
|
|
@ -6,12 +6,12 @@ mod web;
|
|||
use std::sync::Arc;
|
||||
|
||||
use axum::{
|
||||
Router,
|
||||
body::Body,
|
||||
extract::Request,
|
||||
http::StatusCode,
|
||||
middleware::Next,
|
||||
response::{IntoResponse, Response},
|
||||
Router,
|
||||
};
|
||||
use http_body_util::BodyExt;
|
||||
use tower_http::trace::TraceLayer;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::io::Cursor;
|
||||
|
||||
use axum::{routing::get, Router};
|
||||
use axum_extra::{headers::Range, TypedHeader};
|
||||
use axum::{Router, routing::get};
|
||||
use axum_extra::{TypedHeader, headers::Range};
|
||||
use axum_range::{KnownSize, Ranged};
|
||||
|
||||
use super::Context;
|
||||
|
|
Loading…
Reference in New Issue