From 48fde73a7341ffca40b4b8f3c901771e82a07e71 Mon Sep 17 00:00:00 2001 From: vextrixes <113197359+vextrixes@users.noreply.github.com> Date: Sat, 31 Oct 2026 02:42:13 +0100 Subject: [PATCH] fixes --- src/others/endpoints.rs | 4 ++-- src/payments/endpoints.rs | 22 +++++++++++----------- src/semester/endpoints.rs | 2 +- src/semester/mod.rs | 4 ++-- src/subjects/endpoints.rs | 2 +- src/substitutions/endpoints.rs | 4 ++-- src/teaching/endpoints.rs | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/others/endpoints.rs b/src/others/endpoints.rs index 50cbfa6..7faa858 100644 --- a/src/others/endpoints.rs +++ b/src/others/endpoints.rs @@ -2,13 +2,13 @@ use std::marker::PhantomData; use crate::{ApiInfo, Endpoint}; -pub const API_V3_INFO_ENDPOINT: Endpoint<(), ApiInfo> = Endpoint::Get { +pub const API_V3_INFO_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3", auth: false, _types: PhantomData, }; -pub const APIS_INFO_ENDPOINT: Endpoint<(), Vec> = Endpoint::Get { +pub const APIS_INFO_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api", auth: false, _types: PhantomData, diff --git a/src/payments/endpoints.rs b/src/payments/endpoints.rs index 1779c11..9398bd0 100644 --- a/src/payments/endpoints.rs +++ b/src/payments/endpoints.rs @@ -7,37 +7,37 @@ use crate::{ RegularPrescriptionDetail, RegularPrescriptionStudent, RegularPrescriptionStudentDetail, }; -pub const CLASS_FUND_PAYMENT_INFO_ENDPOINT: Endpoint<(), ClassFundPaymentInfo> = Endpoint::Get { +pub const CLASS_FUND_PAYMENT_INFO_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/classfund/paymentsinfo", auth: true, _types: PhantomData, }; -pub const REGULAR_PAYMENTS_INFO_ENDPOINT: Endpoint<(), Vec> = Endpoint::Get { +pub const REGULAR_PAYMENTS_INFO_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api/3/payments/regularpayments", auth: true, _types: PhantomData, }; -pub const REGULAR_PAYMENTS_SUMMARY_ENDPOINT: Endpoint<(), RegularPaymentsSummary> = Endpoint::Get { +pub const REGULAR_PAYMENTS_SUMMARY_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/regularpayments/summary", auth: true, _types: PhantomData, }; -pub const CLASS_FUND_INFO_ENDPOINT: Endpoint<(), Vec> = Endpoint::Get { +pub const CLASS_FUND_INFO_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api/3/payments/classfund", auth: true, _types: PhantomData, }; -pub const CLASS_FUND_SUMMARY_ENDPOINT: Endpoint<(), ClassFundSummary> = Endpoint::Get { +pub const CLASS_FUND_SUMMARY_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/classfund/summary", auth: true, _types: PhantomData, }; -pub const REGULAR_PAYMENT_DETAIL_ENDPOINT: Endpoint<(), RegularPaymentDetail> = Endpoint::Get { +pub const REGULAR_PAYMENT_DETAIL_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/regularpayments/detail/{paymentId}", auth: true, _types: PhantomData, @@ -52,13 +52,13 @@ pub const CLASS_FUND_TEACHER_DOCUMENT_DETAIL_ENDPOINT: Endpoint< _types: PhantomData, }; -pub const REGULAR_PRESCRIPTIONS_ENDPOINT: Endpoint<(), Vec> = Endpoint::Get { +pub const REGULAR_PRESCRIPTIONS_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api/3/payments/regularpayments/teacher/prescriptions", auth: true, _types: PhantomData, }; -pub const CLASS_FUND_TEACHER_STUDENTS_ENDPOINT: Endpoint<(), Vec> = +pub const CLASS_FUND_TEACHER_STUDENTS_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api/3/payments/classfund/teacher/students/{classId}", auth: true, @@ -74,14 +74,14 @@ pub const CLASS_FUND_TEACHER_DOCUMENTS_ENDPOINT: Endpoint< _types: PhantomData, }; -pub const CLASS_FUND_TEACHER_SUMMARY_ENDPOINT: Endpoint<(), ClassFundTeacherSummary> = +pub const CLASS_FUND_TEACHER_SUMMARY_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/classfund/teacher/summary", auth: true, _types: PhantomData, }; -pub const REGULAR_PRESCRIPTION_DETAIL_ENDPOINT: Endpoint<(), RegularPrescriptionDetail> = +pub const REGULAR_PRESCRIPTION_DETAIL_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/payments/regularpayments/teacher/prescriptions/{prescriptionId}", auth: true, @@ -97,7 +97,7 @@ pub const REGULAR_PRESCRIPTION_STUDENT_DETAIL_ENDPOINT: Endpoint< _types: PhantomData, }; -pub const REGULAR_PRESCRIPTION_STUDENTS_ENDPOINT: Endpoint<(), Vec> = +pub const REGULAR_PRESCRIPTION_STUDENTS_ENDPOINT: Endpoint, ()> = Endpoint::Get { url: "/api/3/payments/regularpayments/teacher/prescriptions/{prescriptionId}/students", auth: true, diff --git a/src/semester/endpoints.rs b/src/semester/endpoints.rs index e83270b..c023000 100644 --- a/src/semester/endpoints.rs +++ b/src/semester/endpoints.rs @@ -12,4 +12,4 @@ pub const GET_PEDAGOGICAL_MEASURES_ENDPOINT: Endpoint = url: "/api/3/marks/measures", auth: true, _types: PhantomData, -}; \ No newline at end of file +}; diff --git a/src/semester/mod.rs b/src/semester/mod.rs index 2d7088b..e2b6723 100644 --- a/src/semester/mod.rs +++ b/src/semester/mod.rs @@ -1,5 +1,5 @@ -mod semester; mod endpoints; +mod semester; +pub use endpoints::*; pub use semester::*; -pub use endpoints::*; \ No newline at end of file diff --git a/src/subjects/endpoints.rs b/src/subjects/endpoints.rs index 8ee5e49..d899928 100644 --- a/src/subjects/endpoints.rs +++ b/src/subjects/endpoints.rs @@ -2,7 +2,7 @@ use std::marker::PhantomData; use crate::{Endpoint, Subjects}; -pub const SUBJECTS_ENDPOINT: Endpoint<(), Subjects> = Endpoint::Get { +pub const SUBJECTS_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/subjects", auth: true, _types: PhantomData, diff --git a/src/substitutions/endpoints.rs b/src/substitutions/endpoints.rs index 1f24737..729a6e7 100644 --- a/src/substitutions/endpoints.rs +++ b/src/substitutions/endpoints.rs @@ -2,13 +2,13 @@ use std::marker::PhantomData; use crate::{Endpoint, SubstitutionCycles, Substitutions}; -pub const SUBSTITUTIONS_ENDPOINT: Endpoint<(), Substitutions> = Endpoint::Get { +pub const SUBSTITUTIONS_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/substitutions", auth: true, _types: PhantomData, }; -pub const SUBSTITUTION_CYCLES_ENDPOINT: Endpoint<(), SubstitutionCycles> = Endpoint::Get { +pub const SUBSTITUTION_CYCLES_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/substitutions/cycles", auth: true, _types: PhantomData, diff --git a/src/teaching/endpoints.rs b/src/teaching/endpoints.rs index 3592e88..a0f60ee 100644 --- a/src/teaching/endpoints.rs +++ b/src/teaching/endpoints.rs @@ -3,7 +3,7 @@ use std::marker::PhantomData; use crate::{Endpoint, Teaching}; /// Subject ID = String -pub const TEACHING_ENDPOINT: Endpoint<(), Teaching> = Endpoint::Get { +pub const TEACHING_ENDPOINT: Endpoint = Endpoint::Get { url: "/api/3/subjects/themes/{subjectId}", auth: true, _types: PhantomData,