grpc post request to the table definition from add table, not working, major bug, needs debugging to make it work

This commit is contained in:
filipriec
2025-04-22 23:22:59 +02:00
parent 2992f122bc
commit 6fa8b06063
5 changed files with 156 additions and 5 deletions

View File

@@ -8,7 +8,7 @@ use common::proto::multieko2::table_structure::table_structure_service_client::T
use common::proto::multieko2::table_structure::TableStructureResponse;
use common::proto::multieko2::table_definition::{
table_definition_client::TableDefinitionClient,
ProfileTreeResponse
ProfileTreeResponse, PostTableDefinitionRequest, TableDefinitionResponse,
};
use anyhow::Result;
@@ -67,4 +67,10 @@ impl GrpcClient {
let response = self.table_definition_client.get_profile_tree(request).await?;
Ok(response.into_inner())
}
pub async fn post_table_definition(&mut self, request: PostTableDefinitionRequest) -> Result<TableDefinitionResponse> {
let tonic_request = tonic::Request::new(request);
let response = self.table_definition_client.post_table_definition(tonic_request).await?;
Ok(response.into_inner())
}
}