diff options
author | metamuffin <metamuffin@disroot.org> | 2025-04-30 10:47:54 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-04-30 10:47:54 +0200 |
commit | a2ef3f6ec4c830611fde1a2e935588ccbbc61c03 (patch) | |
tree | ddcc1cb501e6c7237edd491aa7136d02150d03d3 /server/src/ui/admin/mod.rs | |
parent | 212a0f23bc894faf88e159560c113f504349cc05 (diff) | |
download | jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.bz2 jellything-a2ef3f6ec4c830611fde1a2e935588ccbbc61c03.tar.zst |
config works
Diffstat (limited to 'server/src/ui/admin/mod.rs')
-rw-r--r-- | server/src/ui/admin/mod.rs | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/server/src/ui/admin/mod.rs b/server/src/ui/admin/mod.rs index 3a9e4e2..62c5940 100644 --- a/server/src/ui/admin/mod.rs +++ b/server/src/ui/admin/mod.rs @@ -12,7 +12,7 @@ use super::{ }; use crate::{database::Database, helper::A, locale::AcceptLanguage}; use anyhow::{anyhow, Context}; -use jellybase::{assetfed::AssetInner, federation::Federation, CONF}; +use jellybase::assetfed::AssetInner; use jellycommon::routes::u_admin_dashboard; use jellyimport::{import_wrap, is_importing, IMPORT_ERRORS}; use jellylogic::session::AdminSession; @@ -103,7 +103,6 @@ pub async fn r_admin_remove_invite( pub async fn r_admin_import( session: A<AdminSession>, database: &State<Database>, - _federation: &State<Federation>, incremental: bool, ) -> MyResult<Redirect> { drop(session); @@ -139,26 +138,6 @@ pub async fn r_admin_update_search( Ok(Redirect::temporary(u_admin_dashboard())) } -#[post("/admin/delete_cache")] -pub async fn r_admin_delete_cache( - session: A<AdminSession>, - database: &State<Database>, -) -> MyResult<Redirect> { - drop(session); - let t = Instant::now(); - let r = tokio::fs::remove_dir_all(&CONF.cache_path).await; - tokio::fs::create_dir(&CONF.cache_path).await?; - // admin_dashboard( - // database, - // Some( - // r.map_err(|e| e.into()) - // .map(|_| format!("Cache deleted; took {:?}", t.elapsed())), - // ), - // ) - // .await - Ok(Redirect::temporary(u_admin_dashboard())) -} - static SEM_TRANSCODING: Semaphore = Semaphore::const_new(1); fn is_transcoding() -> bool { SEM_TRANSCODING.available_permits() == 0 |