From 5430902782c32c9e862002b58054ae42ff366eba Mon Sep 17 00:00:00 2001 From: vextrixes <113197359+vextrixes@users.noreply.github.com> Date: Sun, 1 Nov 2026 02:56:42 +0100 Subject: [PATCH] fixes --- src/auth/login.rs | 10 +++++----- src/marks/mark_confirmation_status.rs | 2 +- src/payments/endpoints.rs | 2 +- src/payments/regular_payments.rs | 2 +- src/semester/pedagogical_measure.rs | 4 ++-- src/substitutions/change_lesson_info.rs | 10 +++++----- src/timetable/atom.rs | 3 ++- src/timetable/endpoints.rs | 4 ++-- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/auth/login.rs b/src/auth/login.rs index 90d9b8e..6da5c95 100644 --- a/src/auth/login.rs +++ b/src/auth/login.rs @@ -15,13 +15,13 @@ pub struct LoginSuccess { pub app_version: String, } -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, Serialize, Deserialize)] // TODO: evaluate removing or changing debug here #[serde(rename_all = "snake_case")] pub struct LoginRequest { - client_id: String, - grant_type: String, - username: String, - password: String, + pub client_id: String, + pub grant_type: String, + pub username: String, + pub password: String, } #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/src/marks/mark_confirmation_status.rs b/src/marks/mark_confirmation_status.rs index 3b08491..2a16167 100644 --- a/src/marks/mark_confirmation_status.rs +++ b/src/marks/mark_confirmation_status.rs @@ -1,4 +1,4 @@ -pub use serde::{Deserialize, Serialize}; +use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] diff --git a/src/payments/endpoints.rs b/src/payments/endpoints.rs index cae1609..84fe2cc 100644 --- a/src/payments/endpoints.rs +++ b/src/payments/endpoints.rs @@ -88,8 +88,8 @@ pub const REGULAR_PRESCRIPTION_DETAIL_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/regularpayments/teacher/prescriptions/{prescriptionId}/students/{studentId}", auth: true, diff --git a/src/payments/regular_payments.rs b/src/payments/regular_payments.rs index 9d59165..0ccccfe 100644 --- a/src/payments/regular_payments.rs +++ b/src/payments/regular_payments.rs @@ -54,7 +54,7 @@ pub struct RegularPrescriptionDetail { pub payment_type_id: i64, pub payment_type_name: Option, pub amount: f64, - pub state: RegularPrescription, + pub state: RegularPrescriptionState, pub due_date_max: DateTime, pub bank_account: Option, pub specific_symbol: Option, diff --git a/src/semester/pedagogical_measure.rs b/src/semester/pedagogical_measure.rs index 07f0cf0..11983ab 100644 --- a/src/semester/pedagogical_measure.rs +++ b/src/semester/pedagogical_measure.rs @@ -3,13 +3,13 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] -pub struct PedagogicalMeasure { +pub struct PedagogicalMeasures { pub pedagogical_measures: Vec, } #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] -pub struct PedagogicalMeasures { +pub struct PedagogicalMeasure { pub school_year: String, pub semester: String, pub type_label: String, diff --git a/src/substitutions/change_lesson_info.rs b/src/substitutions/change_lesson_info.rs index 0880556..526a1a8 100644 --- a/src/substitutions/change_lesson_info.rs +++ b/src/substitutions/change_lesson_info.rs @@ -3,9 +3,9 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "PascalCase")] pub struct ChangeLessonInfo { - class_abbrev: Option, - group_abbrev: Option, - is_class_group: Option, - subject_abbrev: Option, - room_abbrev: Option, + pub class_abbrev: Option, + pub group_abbrev: Option, + pub is_class_group: Option, + pub subject_abbrev: Option, + pub room_abbrev: Option, } diff --git a/src/timetable/atom.rs b/src/timetable/atom.rs index a0d6aaa..65641c6 100644 --- a/src/timetable/atom.rs +++ b/src/timetable/atom.rs @@ -18,7 +18,8 @@ pub struct Atom { pub theme: Option, pub assistants: Vec, pub notice: Option, - pub planned_clasification: Option, + #[serde(rename = "PlannedClasification")] + pub planned_classification: Option, pub week_theme: Option, pub lesson_release: LessonRelease, pub start: Option, diff --git a/src/timetable/endpoints.rs b/src/timetable/endpoints.rs index b30de3d..698e612 100644 --- a/src/timetable/endpoints.rs +++ b/src/timetable/endpoints.rs @@ -1,13 +1,13 @@ use crate::{Endpoint, Timetable}; use std::marker::PhantomData; -pub const PERNAMENT_TIMETABLE_ENDPOINT: Endpoint = Endpoint::Get { +pub const PERMAMENT_TIMETABLE_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/timetable/permanent", auth: true, _types: PhantomData, }; -pub const PERNAMENT_TIMETABLE_CLASS_ENDPOINT: Endpoint = Endpoint::Get { +pub const PERMAMENT_TIMETABLE_CLASS_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/timetable/permanent/class/{classId}", auth: true, _types: PhantomData,