Skip to content

Commit

Permalink
Merge branch 'master' into 370-add-near-app-side-library
Browse files Browse the repository at this point in the history
  • Loading branch information
its-saeed authored Jun 26, 2024
2 parents 1b4474e + 8915989 commit 104cb64
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions crates/server/src/admin/handlers/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ use crate::admin::service::{parse_api_error, AdminState, ApiError, ApiResponse};
use crate::admin::storage::client_keys::get_context_client_key;
use crate::admin::storage::context::{add_context, delete_context, get_context, get_contexts};

#[derive(Debug, Serialize, Deserialize)]
pub struct ContextObject {
context: Context,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct GetContextResponse {
data: Context,
data: ContextObject,
}

pub async fn get_context_handler(
Expand All @@ -29,7 +34,7 @@ pub async fn get_context_handler(
match context_result {
Ok(ctx) => match ctx {
Some(context) => ApiResponse {
payload: GetContextResponse { data: context },
payload: GetContextResponse { data: ContextObject { context } },
}
.into_response(),
None => ApiError {
Expand Down

0 comments on commit 104cb64

Please sign in to comment.