fake personal history
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
use crate::model::user::User;
|
||||
use serde::Serialize;
|
||||
use sqlx::{FromRow, Row, SqlitePool};
|
||||
|
||||
@ -41,3 +42,26 @@ ORDER BY rowed_km DESC;
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct PersonalStat {
|
||||
date: String,
|
||||
km: i32,
|
||||
}
|
||||
|
||||
pub async fn get_personal(db: &SqlitePool, user: &User) -> Vec<PersonalStat> {
|
||||
vec![
|
||||
PersonalStat {
|
||||
date: String::from("2023-01-01"),
|
||||
km: 5,
|
||||
},
|
||||
PersonalStat {
|
||||
date: String::from("2023-02-01"),
|
||||
km: 24,
|
||||
},
|
||||
PersonalStat {
|
||||
date: String::from("2023-08-30"),
|
||||
km: 1340,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user