Skip to content

Commit fa156e1

Browse files
committed
fix tests
1 parent 0ee66c1 commit fa156e1

File tree

3 files changed

+140
-82
lines changed

3 files changed

+140
-82
lines changed

crates/client-api/src/lib.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,24 @@ impl Host {
8585
let sql_span = tracing::trace_span!("execute_sql", total_duration = tracing::field::Empty,);
8686
let _guard = sql_span.enter();
8787

88-
let result = sql::execute::run(&db, &body, auth, Some(&module_host), auth.caller, &mut header)
89-
.await
90-
.map_err(|e| {
91-
log::warn!("{e}");
92-
if let Some(auth_err) = e.get_auth_error() {
93-
(StatusCode::UNAUTHORIZED, auth_err.to_string())
94-
} else {
95-
(StatusCode::BAD_REQUEST, e.to_string())
96-
}
97-
})?;
88+
let result = sql::execute::run(
89+
&db,
90+
&body,
91+
auth,
92+
Some(&module_host.info.subscriptions),
93+
Some(&module_host),
94+
auth.caller,
95+
&mut header,
96+
)
97+
.await
98+
.map_err(|e| {
99+
log::warn!("{e}");
100+
if let Some(auth_err) = e.get_auth_error() {
101+
(StatusCode::UNAUTHORIZED, auth_err.to_string())
102+
} else {
103+
(StatusCode::BAD_REQUEST, e.to_string())
104+
}
105+
})?;
98106

99107
let total_duration = sql_start.elapsed();
100108
drop(_guard);

0 commit comments

Comments
 (0)