forked from Ruderverein-Donau-Linz/rowt
Merge pull request 'update-deps' (#846) from update-deps into staging
Reviewed-on: Ruderverein-Donau-Linz/rowt#846
This commit is contained in:
commit
3bd229554b
1146
Cargo.lock
generated
1146
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -13,18 +13,18 @@ rocket = { version = "0.5.0", features = ["secrets"]}
|
||||
rocket_dyn_templates = {version = "0.2", features = [ "tera" ], optional = true }
|
||||
log = "0.4"
|
||||
env_logger = "0.11"
|
||||
sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono", "time"] }
|
||||
sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono"] }
|
||||
argon2 = "0.5"
|
||||
serde = { version = "1.0", features = [ "derive" ]}
|
||||
serde_json = "1.0"
|
||||
chrono = { version = "0.4", features = ["serde"]}
|
||||
chrono-tz = "0.9"
|
||||
chrono-tz = "0.10"
|
||||
tera = { version = "1.18", features = ["date-locale"], optional = true}
|
||||
ics = "0.5"
|
||||
futures = "0.3"
|
||||
lettre = "0.11"
|
||||
csv = "1.3"
|
||||
itertools = "0.13"
|
||||
itertools = "0.14"
|
||||
job_scheduler_ng = "2.0"
|
||||
ureq = { version = "2.9", features = ["json"] }
|
||||
regex = "1.10"
|
||||
|
20
src/lib.rs
20
src/lib.rs
@ -11,16 +11,16 @@ pub mod rest;
|
||||
pub mod scheduled;
|
||||
|
||||
pub(crate) const AMOUNT_DAYS_TO_SHOW_TRIPS_AHEAD: i64 = 10;
|
||||
pub(crate) const RENNRUDERBEITRAG: i32 = 11000;
|
||||
pub(crate) const BOAT_STORAGE: i32 = 4500;
|
||||
pub(crate) const FAMILY_TWO: i32 = 30000;
|
||||
pub(crate) const FAMILY_THREE_OR_MORE: i32 = 35000;
|
||||
pub(crate) const STUDENT_OR_PUPIL: i32 = 8000;
|
||||
pub(crate) const REGULAR: i32 = 22000;
|
||||
pub(crate) const UNTERSTUETZEND: i32 = 2500;
|
||||
pub(crate) const FOERDERND: i32 = 8500;
|
||||
pub(crate) const SCHECKBUCH: i32 = 3000;
|
||||
pub(crate) const EINSCHREIBGEBUEHR: i32 = 3000;
|
||||
pub(crate) const RENNRUDERBEITRAG: i64 = 11000;
|
||||
pub(crate) const BOAT_STORAGE: i64 = 4500;
|
||||
pub(crate) const FAMILY_TWO: i64 = 30000;
|
||||
pub(crate) const FAMILY_THREE_OR_MORE: i64 = 35000;
|
||||
pub(crate) const STUDENT_OR_PUPIL: i64 = 8000;
|
||||
pub(crate) const REGULAR: i64 = 22000;
|
||||
pub(crate) const UNTERSTUETZEND: i64 = 2500;
|
||||
pub(crate) const FOERDERND: i64 = 8500;
|
||||
pub(crate) const SCHECKBUCH: i64 = 3000;
|
||||
pub(crate) const EINSCHREIBGEBUEHR: i64 = 3000;
|
||||
|
||||
#[cfg(test)]
|
||||
#[macro_export]
|
||||
|
@ -96,8 +96,8 @@ FROM trip WHERE planned_event_id = ?
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.map(|r| Registration {
|
||||
name: r.name,
|
||||
registered_at: r.registered_at,
|
||||
name: r.name.unwrap(),
|
||||
registered_at: r.registered_at.unwrap(),
|
||||
is_guest: false,
|
||||
is_real_guest: false,
|
||||
})
|
||||
|
@ -74,7 +74,7 @@ GROUP BY family.id;"
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn amount_family_members(&self, db: &SqlitePool) -> i32 {
|
||||
pub async fn amount_family_members(&self, db: &SqlitePool) -> i64 {
|
||||
sqlx::query!(
|
||||
"SELECT COUNT(*) as count FROM user WHERE family_id = ?",
|
||||
self.id
|
||||
|
@ -3,8 +3,8 @@ use serde::Serialize;
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct Fee {
|
||||
pub sum_in_cents: i32,
|
||||
pub parts: Vec<(String, i32)>,
|
||||
pub sum_in_cents: i64,
|
||||
pub parts: Vec<(String, i64)>,
|
||||
pub name: String,
|
||||
pub user_ids: String,
|
||||
pub paid: bool,
|
||||
@ -29,7 +29,7 @@ impl Fee {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add(&mut self, desc: String, price_in_cents: i32) {
|
||||
pub fn add(&mut self, desc: String, price_in_cents: i64) {
|
||||
self.sum_in_cents += price_in_cents;
|
||||
|
||||
self.parts.push((desc, price_in_cents));
|
||||
|
@ -60,7 +60,7 @@ pub struct User {
|
||||
pub struct UserWithDetails {
|
||||
#[serde(flatten)]
|
||||
pub user: User,
|
||||
pub amount_unread_notifications: i32,
|
||||
pub amount_unread_notifications: i64,
|
||||
pub allowed_to_steer: bool,
|
||||
pub on_water: bool,
|
||||
pub roles: Vec<String>,
|
||||
@ -405,7 +405,7 @@ ASKÖ Ruderverein Donau Linz", self.name),
|
||||
fee
|
||||
}
|
||||
|
||||
pub async fn amount_boats(&self, db: &SqlitePool) -> i32 {
|
||||
pub async fn amount_boats(&self, db: &SqlitePool) -> i64 {
|
||||
sqlx::query!(
|
||||
"SELECT COUNT(*) as count FROM boat WHERE owner = ?",
|
||||
self.id
|
||||
@ -416,7 +416,7 @@ ASKÖ Ruderverein Donau Linz", self.name),
|
||||
.count
|
||||
}
|
||||
|
||||
pub async fn amount_unread_notifications(&self, db: &SqlitePool) -> i32 {
|
||||
pub async fn amount_unread_notifications(&self, db: &SqlitePool) -> i64 {
|
||||
sqlx::query!(
|
||||
"SELECT COUNT(*) as count FROM notification WHERE user_id = ? AND read_at IS NULL",
|
||||
self.id
|
||||
|
Loading…
x
Reference in New Issue
Block a user