From 0bc8c0e6abdf8a34b2cb3843d5a30b57106b8e17 Mon Sep 17 00:00:00 2001 From: Franklin Date: Tue, 3 Oct 2023 08:00:45 -0400 Subject: [PATCH] League svc 1.1 --- Cargo.lock | 1 - Cargo.toml | 2 +- src/domain/league.rs | 2 +- src/domain/trust.rs | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e458d8..f62c36b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -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", diff --git a/Cargo.toml b/Cargo.toml index 0f05a8c..d0d7a59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" } diff --git a/src/domain/league.rs b/src/domain/league.rs index 0ba6698..f16ec9c 100644 --- a/src/domain/league.rs +++ b/src/domain/league.rs @@ -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 { diff --git a/src/domain/trust.rs b/src/domain/trust.rs index a49bc71..a1f5207 100644 --- a/src/domain/trust.rs +++ b/src/domain/trust.rs @@ -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() } } } \ No newline at end of file