League svc 1.1
This commit is contained in:
parent
a58fe6334f
commit
0bc8c0e6ab
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -246,7 +246,6 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||
[[package]]
|
||||
name = "err"
|
||||
version = "0.1.1"
|
||||
source = "git+https://git.franklinblanco.dev/franklinblanco/err.git#18cc77b6266d0fc90237a7ccb297d3eeb574f78a"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"sqlx",
|
||||
|
@ -15,4 +15,4 @@ serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = { version = "1" }
|
||||
chrono = { version = "0.4", features = [ "serde" ] }
|
||||
sqlx = { version = "0.7", features = [ "postgres" ] }
|
||||
err = { git = "https://git.franklinblanco.dev/franklinblanco/err.git" }
|
||||
err = { path = "/Users/franklinblanco/Desktop/Code/rust/libs/dev-deps/err" }
|
||||
|
@ -33,7 +33,7 @@ pub struct League {
|
||||
|
||||
#[allow(unused)]
|
||||
impl League {
|
||||
fn from_league_creation_dto(league_dto: LeagueForCreationDto, owner_id: i32) -> Self {
|
||||
pub fn from_league_creation_dto(league_dto: LeagueForCreationDto, owner_id: i32) -> Self {
|
||||
Self {
|
||||
id: 0, owner_id, sport_id: league_dto.sport_id, place_id:league_dto.place_id, time_created: Utc::now(), last_updated: Utc::now(), state: LeagueState::Open,
|
||||
visibility: match league_dto.visibility {
|
||||
|
@ -17,7 +17,7 @@ pub struct Trust {
|
||||
|
||||
#[allow(unused)]
|
||||
impl Trust {
|
||||
fn from_trust_dto(trust_dto: TrustRequestDto, player_id: i32) -> Self {
|
||||
pub fn from_trust_dto(trust_dto: TrustRequestDto, player_id: i32) -> Self {
|
||||
Trust { id: 0, truster_id: player_id, trustee_id: trust_dto.trustee_id, time_created: Utc::now(), last_updated: Utc::now() }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user