mirror of
https://github.com/n08i40k/schedule-parser-rusted.git
synced 2025-12-06 17:57:47 +03:00
refactor(parser): rewrite some parts of code
This commit is contained in:
@@ -39,7 +39,7 @@ pub async fn group(user: SyncExtractor<User>, app_state: web::Data<AppState>) ->
|
||||
}
|
||||
|
||||
mod schema {
|
||||
use crate::parser::schema::ScheduleEntry;
|
||||
use schedule_parser::schema::ScheduleEntry;
|
||||
use actix_macros::{IntoResponseErrorNamed, StatusCode};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use derive_more::Display;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::app_state::{AppState, Schedule};
|
||||
use crate::parser::schema::ScheduleEntry;
|
||||
use schedule_parser::schema::ScheduleEntry;
|
||||
use actix_macros::{IntoResponseErrorNamed, ResponderJson, StatusCode};
|
||||
use actix_web::web;
|
||||
use chrono::{DateTime, Duration, Utc};
|
||||
|
||||
@@ -40,7 +40,7 @@ pub async fn teacher(
|
||||
}
|
||||
|
||||
mod schema {
|
||||
use crate::parser::schema::ScheduleEntry;
|
||||
use schedule_parser::schema::ScheduleEntry;
|
||||
use actix_macros::{IntoResponseErrorNamed, StatusCode};
|
||||
use chrono::{DateTime, NaiveDateTime, Utc};
|
||||
use derive_more::Display;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use self::schema::*;
|
||||
use crate::AppState;
|
||||
use crate::app_state::Schedule;
|
||||
use crate::parser::parse_xls;
|
||||
use schedule_parser::parse_xls;
|
||||
use crate::routes::schedule::schema::CacheStatus;
|
||||
use crate::routes::schema::{IntoResponseAsError, ResponseError};
|
||||
use crate::xls_downloader::interface::{FetchError, XLSDownloader};
|
||||
@@ -79,7 +79,7 @@ pub async fn update_download_url(
|
||||
}
|
||||
|
||||
mod schema {
|
||||
use crate::parser::schema::ParseError;
|
||||
use schedule_parser::schema::ParseError;
|
||||
use crate::routes::schedule::schema::CacheStatus;
|
||||
use actix_macros::{IntoResponseErrorNamed, StatusCode};
|
||||
use derive_more::Display;
|
||||
|
||||
Reference in New Issue
Block a user