refactor: Simplify string conversion for hackathon and timeline attributes in seed test submission
This commit is contained in:
+2
-2
@@ -8,8 +8,8 @@ REMOTE_HOST="70.153.9.42"
|
|||||||
REMOTE_PATH="/home/asephs/imphnen-backend-service"
|
REMOTE_PATH="/home/asephs/imphnen-backend-service"
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
taskset -c 0,1 cargo build --release -j 2
|
# taskset -c 0,1 cargo build --release -j 2
|
||||||
|
cargo build --release
|
||||||
# Rsync hasil build dan file yang diperlukan
|
# Rsync hasil build dan file yang diperlukan
|
||||||
rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
target/release/ \
|
target/release/ \
|
||||||
|
|||||||
@@ -281,8 +281,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
|
|
||||||
let alias_hackathon = HackathonSchema {
|
let alias_hackathon = HackathonSchema {
|
||||||
id: Thing::from(("app_hackathons", alias_id)),
|
id: Thing::from(("app_hackathons", alias_id)),
|
||||||
name: name.clone().into(),
|
name: name.into(),
|
||||||
description: description.clone().into(),
|
description: description.into(),
|
||||||
start_date: DateTime::parse_from_rfc3339(start_date)?.with_timezone(&Utc),
|
start_date: DateTime::parse_from_rfc3339(start_date)?.with_timezone(&Utc),
|
||||||
end_date: DateTime::parse_from_rfc3339(end_date)?.with_timezone(&Utc),
|
end_date: DateTime::parse_from_rfc3339(end_date)?.with_timezone(&Utc),
|
||||||
registration_deadline: DateTime::parse_from_rfc3339(registration_deadline)?.with_timezone(&Utc),
|
registration_deadline: DateTime::parse_from_rfc3339(registration_deadline)?.with_timezone(&Utc),
|
||||||
@@ -357,7 +357,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
id: Thing::from(("app_hackathon_timeline", alias_timeline_id.as_str())),
|
id: Thing::from(("app_hackathon_timeline", alias_timeline_id.as_str())),
|
||||||
hackathon_id: Thing::from(("app_hackathons", alias_hackathon_id)),
|
hackathon_id: Thing::from(("app_hackathons", alias_hackathon_id)),
|
||||||
phase: phase.clone(),
|
phase: phase.clone(),
|
||||||
title: title.clone().into(),
|
title: title.into(),
|
||||||
description: description.clone(),
|
description: description.clone(),
|
||||||
start_date: DateTime::parse_from_rfc3339(start_date)?.with_timezone(&Utc),
|
start_date: DateTime::parse_from_rfc3339(start_date)?.with_timezone(&Utc),
|
||||||
end_date: DateTime::parse_from_rfc3339(end_date)?.with_timezone(&Utc),
|
end_date: DateTime::parse_from_rfc3339(end_date)?.with_timezone(&Utc),
|
||||||
|
|||||||
Reference in New Issue
Block a user