Skip to content

Commit a337bec

Browse files
committed
use Identity
1 parent 6fced42 commit a337bec

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

crates/client-api/src/routes/database.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ pub struct CallFromDatabaseParams {
228228
/// Both fields are mandatory; a missing field results in a 400 Bad Request.
229229
#[derive(Deserialize)]
230230
pub struct CallFromDatabaseQuery {
231-
/// Hex-encoded [`Identity`] of the sending database.
232-
sender_identity: String,
231+
/// [`Identity`] of the sending database, parsed from a hex query string.
232+
sender_identity: Identity,
233233
/// The inter-database message ID from the sender's st_outbound_msg.
234234
/// Used for at-most-once delivery via `st_inbound_msg`.
235235
msg_id: u64,
@@ -269,13 +269,6 @@ pub async fn call_from_database<S: ControlStateDelegate + NodeDelegate>(
269269

270270
let caller_identity = auth.claims.identity;
271271

272-
let sender_identity = Identity::from_hex(&sender_identity).map_err(|_| {
273-
(
274-
StatusCode::BAD_REQUEST,
275-
"Invalid sender_identity: expected hex-encoded identity",
276-
)
277-
})?;
278-
279272
let args = FunctionArgs::Bsatn(body);
280273
let connection_id = generate_random_connection_id();
281274

0 commit comments

Comments
 (0)