File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ impl DbAuthStrategy for GlobeStrategy {
2020 ) -> Pin < Box < dyn Future < Output = Result < TursoConfig , Box < dyn std:: error:: Error > > > + Send + ' a > >
2121 {
2222 Box :: pin ( async move {
23- let globe_auth_api = std:: env:: var ( "GLOBE_DS_API" ) ?;
23+ let globe_auth_api = std:: env:: var ( "GLOBE_DS_API" )
24+ . map_err ( |_| "GLOBE_DS_API environment variable not set" ) ?;
2425
2526 let clean_db_name = db_name. split ( '.' ) . next ( ) . unwrap_or ( db_name) ;
26- let request_body = serde_json:: json!( { "db_name" : clean_db_name } ) ;
2727
2828 let response = client
29- . post ( format ! ( "{}/db/auth" , globe_auth_api) )
30- . body ( request_body. to_string ( ) )
29+ . get ( format ! ( "{}/db/{}/get_auth" , globe_auth_api, clean_db_name) )
3130 . send ( )
3231 . await
3332 . map_err ( |_| "Failed to fetch auth credentials for database" ) ?;
You can’t perform that action at this time.
0 commit comments