Skip to content

Commit

Permalink
Make POST /api/measurements/ take an i64 instead of a RecordId
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatekii committed Jan 18, 2025
1 parent 5b4a788 commit c2be648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/functions/create_measurement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub async fn create_measurement(
let created: Option<Record> = DB
.create("measurement")
.content(CreateMeasurementModel {
run: run.run.clone(),
run: RecordId::from_table_key("run", run.run),
benchmark: created.unwrap().id,
datetime: run.datetime,
probe: run.probe,
Expand Down Expand Up @@ -53,7 +53,7 @@ pub async fn create_measurement(
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
#[serde(rename_all = "camelCase")]
pub struct CreateMeasurement {
pub run: RecordId,
pub run: i64,
pub datetime: Datetime,

pub name: String,
Expand Down

0 comments on commit c2be648

Please sign in to comment.