time for changing it all

This commit is contained in:
filipriec
2025-04-18 18:11:12 +02:00
parent bdcc10bd40
commit 09ccad2bd4
4 changed files with 125 additions and 55 deletions

View File

@@ -5,13 +5,14 @@ use common::proto::multieko2::auth::{
LoginRequest, LoginResponse,
RegisterRequest, AuthResponse,
};
use std::error::Error;
pub struct AuthClient {
client: AuthServiceClient<Channel>,
}
impl AuthClient {
pub async fn new() -> Result<Self, Box<dyn std::error::Error>> {
pub async fn new() -> Result<Self, Box<dyn Error + Send + Sync>> {
let client = AuthServiceClient::connect("http://[::1]:50051").await?;
Ok(Self { client })
}