Skip to content

Commit c2be648

Browse files
committed
Make POST /api/measurements/ take an i64 instead of a RecordId
1 parent 5b4a788 commit c2be648

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/functions/create_measurement.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub async fn create_measurement(
2525
let created: Option<Record> = DB
2626
.create("measurement")
2727
.content(CreateMeasurementModel {
28-
run: run.run.clone(),
28+
run: RecordId::from_table_key("run", run.run),
2929
benchmark: created.unwrap().id,
3030
datetime: run.datetime,
3131
probe: run.probe,
@@ -53,7 +53,7 @@ pub async fn create_measurement(
5353
#[derive(Serialize, Deserialize, Clone, PartialEq, Debug)]
5454
#[serde(rename_all = "camelCase")]
5555
pub struct CreateMeasurement {
56-
pub run: RecordId,
56+
pub run: i64,
5757
pub datetime: Datetime,
5858

5959
pub name: String,

0 commit comments

Comments
 (0)