From 8d12df4943ed13908f1abb830fb9ea9ef9e5a546 Mon Sep 17 00:00:00 2001 From: alyssa Date: Tue, 18 Jun 2024 17:57:33 +0900 Subject: [PATCH] fix(api): rename shard_id field in shard state to id --- lib/libpk/build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpk/build.rs b/lib/libpk/build.rs index 46c0af3e..6569962b 100644 --- a/lib/libpk/build.rs +++ b/lib/libpk/build.rs @@ -3,6 +3,7 @@ use std::io::Result; fn main() -> Result<()> { prost_build::Config::new() .type_attribute(".ShardState", "#[derive(serde::Serialize)]") + .field_attribute(".ShardState.shard_id", "#[serde(rename = \"id\")]") .compile_protos(&["../../proto/state.proto"], &["../../proto/"])?; Ok(()) }