From ea66874884f9517797bdf08d422ad7230b2607cc Mon Sep 17 00:00:00 2001 From: Fran Domovic Date: Fri, 14 Jun 2024 14:30:55 +0200 Subject: [PATCH] fix: rename user to context user --- crates/primitives/src/identity.rs | 2 +- crates/server/src/admin/handlers/context.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/primitives/src/identity.rs b/crates/primitives/src/identity.rs index 4c2e95a0c..2d2aa5e9f 100644 --- a/crates/primitives/src/identity.rs +++ b/crates/primitives/src/identity.rs @@ -28,7 +28,7 @@ pub struct ClientKey { #[derive(Debug, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] -pub struct User { +pub struct ContextUser { pub user_id: String, pub joined_at: u64, } diff --git a/crates/server/src/admin/handlers/context.rs b/crates/server/src/admin/handlers/context.rs index a73221686..ac2963c87 100644 --- a/crates/server/src/admin/handlers/context.rs +++ b/crates/server/src/admin/handlers/context.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use axum::extract::Path; use axum::response::IntoResponse; use axum::{Extension, Json}; -use calimero_primitives::identity::{ClientKey, Context, User}; +use calimero_primitives::identity::{ClientKey, Context, ContextUser}; use calimero_server_primitives::admin::ContextStorage; use rand::RngCore; use reqwest::StatusCode; @@ -73,7 +73,7 @@ pub async fn get_context_client_keys_handler( #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] struct ContextUsers { - context_users: Vec, + context_users: Vec, } #[derive(Debug, Serialize, Deserialize)]