use super::api_error; use super::FallibleApiResponse; use mongodb::bson::doc; use rocket::{get, State}; use serde_json::json; use crate::check_admin; use crate::library::user::User; use crate::library::Libary; #[get("/library/clean")] pub async fn clean_library(lib: &State, u: User) -> FallibleApiResponse { check_admin!(u); lib.clean_lost_files().await; Ok(json!({"ok": 1})) }