mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 13:01:12 +03:00
(*≧ω≦*) Preparing for 0.3.0 release!
~ README revised ~ updated Docker files + all const are placed in a separate file + auto creation for avatars folder + automatic retrieval of the latest Figura version for version request in api
This commit is contained in:
parent
d45a495cbf
commit
dabe176e0e
13 changed files with 355 additions and 224 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use std::{sync::Arc, time::Duration};
|
||||
use std::sync::Arc;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use axum::{
|
||||
|
|
@ -8,12 +8,10 @@ use dashmap::DashMap;
|
|||
use tracing::{debug, error, trace};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::{ApiError, ApiResult, AppState};
|
||||
use crate::{ApiError, ApiResult, AppState, TIMEOUT, USER_AGENT};
|
||||
|
||||
use super::types::*;
|
||||
|
||||
const TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
// It's an extractor that pulls a token from the Header.
|
||||
#[derive(PartialEq, Debug)]
|
||||
pub struct Token(pub String);
|
||||
|
|
@ -63,7 +61,7 @@ async fn fetch_json(
|
|||
server_id: &str,
|
||||
username: &str,
|
||||
) -> anyhow::Result<anyhow::Result<(Uuid, AuthProvider)>> {
|
||||
let client = reqwest::Client::builder().timeout(TIMEOUT).build().unwrap();
|
||||
let client = reqwest::Client::builder().timeout(TIMEOUT).user_agent(USER_AGENT).build().unwrap();
|
||||
let url = auth_provider.url.clone();
|
||||
|
||||
let res = client
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue