get count
This commit is contained in:
@@ -4,7 +4,7 @@ use tonic_reflection::server::Builder as ReflectionBuilder;
|
||||
use crate::adresar::handlers::{
|
||||
post_adresar, get_adresar, put_adresar, delete_adresar, get_adresar_count, get_adresar_by_position, get_table_structure
|
||||
};
|
||||
use crate::uctovnictvo::handlers::{post_uctovnictvo, get_uctovnictvo}; // Update this line
|
||||
use crate::uctovnictvo::handlers::{post_uctovnictvo, get_uctovnictvo, get_uctovnictvo_count};
|
||||
use crate::proto::multieko2::{
|
||||
FILE_DESCRIPTOR_SET,
|
||||
};
|
||||
@@ -104,6 +104,14 @@ impl Uctovnictvo for UctovnictvoService {
|
||||
let response = get_uctovnictvo(&self.db_pool, request.into_inner()).await?;
|
||||
Ok(Response::new(response))
|
||||
}
|
||||
|
||||
async fn get_uctovnictvo_count(
|
||||
&self,
|
||||
request: Request<Empty>,
|
||||
) -> Result<Response<CountResponse>, Status> {
|
||||
let response = get_uctovnictvo_count(&self.db_pool, request.into_inner()).await?;
|
||||
Ok(Response::new(response))
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn run_server(db_pool: sqlx::PgPool) -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
||||
Reference in New Issue
Block a user