diff --git a/src/dao/property.rs b/src/dao/property.rs index 6c73046..efc5b31 100644 --- a/src/dao/property.rs +++ b/src/dao/property.rs @@ -26,8 +26,13 @@ pub async fn insert_property(conn: &PgPool, property: Property) -> Result Result, sqlx::Error> { - sqlx::query_file_as!(Property, "sql/property/get_with_id.sql", property_id).fetch_optional(conn).await +pub async fn get_property_with_id( + conn: &PgPool, + property_id: &Uuid, +) -> Result, sqlx::Error> { + sqlx::query_file_as!(Property, "sql/property/get_with_id.sql", property_id) + .fetch_optional(conn) + .await } pub async fn update_property(conn: &PgPool, property: Property) -> Result { @@ -52,4 +57,4 @@ pub async fn update_property(conn: &PgPool, property: Property) -> Result