Skip to content

Commit

Permalink
fix: save route description
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtIeSocks committed Nov 14, 2023
1 parent 33cc297 commit c69cc3c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/model/src/utils/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,22 @@ impl JsonToModel for Value {
None
};
let mode = get_enum(mode);
let description =
if let Some(description) = incoming.get("description") {
if let Some(description) = description.as_str() {
Some(description.to_string())
} else {
None
}
} else {
None
};
Ok(route::ActiveModel {
name: Set(name.to_string()),
geometry: Set(value),
mode: Set(mode),
geofence_id: Set(geofence_id as u32),
description: Set(description),
..Default::default()
})
}
Expand Down

1 comment on commit c69cc3c

@vercel
Copy link

@vercel vercel bot commented on c69cc3c Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

koji – ./

koji.vercel.app
koji-turtiesocks.vercel.app
koji-git-main-turtiesocks.vercel.app

Please sign in to comment.