mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2026-10-30 15:11:13 +03:00
18 lines
420 B
Rust
18 lines
420 B
Rust
use crate::routes::schedule::schema::CacheStatus;
|
|
use crate::AppState;
|
|
use actix_web::{get, web};
|
|
use std::ops::Deref;
|
|
|
|
#[utoipa::path(responses(
|
|
(status = OK, body = CacheStatus),
|
|
))]
|
|
#[get("/cache-status")]
|
|
pub async fn cache_status(app_state: web::Data<AppState>) -> CacheStatus {
|
|
app_state
|
|
.get_schedule_snapshot("eng_polytechnic")
|
|
.await
|
|
.unwrap()
|
|
.deref()
|
|
.into()
|
|
}
|