Skip to content

Commit

Permalink
handle add_records payload
Browse files Browse the repository at this point in the history
  • Loading branch information
c12i committed Sep 9, 2024
1 parent 58889c1 commit 7ac9777
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/routes/add_records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ use crate::{

use super::ChcPathParams;

#[tracing::instrument(skip(app_state))]
#[tracing::instrument(skip(app_state, request))]
pub async fn add_records(
Path(params): Path<ChcPathParams>,
State(app_state): State<Arc<AppState>>,
MsgPack(request): MsgPack<AddRecordsRequest>,
) -> Result<(), ChcServiceError> {
if request.is_empty() {
return Ok(());
}

let cell_id = params.try_into()?;

let mut m = app_state.records.write();
Expand Down
2 changes: 1 addition & 1 deletion src/routes/get_record_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use super::ChcPathParams;

pub type GetRecordDataResult = Vec<(SignedActionHashed, Option<(Arc<EncryptedEntry>, Signature)>)>;

#[tracing::instrument(skip(app_state))]
#[tracing::instrument(skip(app_state, request))]
pub async fn get_record_data(
Path(params): Path<ChcPathParams>,
State(app_state): State<Arc<AppState>>,
Expand Down

0 comments on commit 7ac9777

Please sign in to comment.