File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ pub struct ApiClient {
3232 pub api_url : String ,
3333 workspace_id : Option < String > ,
3434 sandbox_id : Option < String > ,
35+ database_id : Option < String > ,
3536}
3637
3738impl ApiClient {
@@ -117,6 +118,7 @@ impl ApiClient {
117118 }
118119 profile_config. sandbox
119120 } ) ,
121+ database_id : crate :: config:: load_current_database ( "default" ) ,
120122 }
121123 }
122124
@@ -129,6 +131,7 @@ impl ApiClient {
129131 api_url : api_url. to_string ( ) ,
130132 workspace_id : workspace_id. map ( String :: from) ,
131133 sandbox_id : None ,
134+ database_id : None ,
132135 }
133136 }
134137
@@ -167,6 +170,9 @@ impl ApiClient {
167170 req = req. header ( "X-Session-Id" , sid) ;
168171 req = req. header ( "X-Sandbox-Id" , sid) ;
169172 }
173+ if let Some ( ref db_id) = self . database_id {
174+ req = req. header ( "X-Database-Id" , db_id) ;
175+ }
170176 req
171177 }
172178
You can’t perform that action at this time.
0 commit comments