Allow the zed app to connect to both the old and new rpc endpoints
In the case of the new Next.js app, the app will follow a redirect from 'zed.dev/rpc' to the subdomain where the rust service is hosted. Until then, the app will connect directly to zed.dev/rpc.
This commit is contained in:
parent
f499a1dfc2
commit
a080ae98c6
16 changed files with 107 additions and 72 deletions
|
@ -2440,9 +2440,10 @@ mod tests {
|
|||
}
|
||||
|
||||
async fn create_client(&mut self, cx: &mut TestAppContext, name: &str) -> TestClient {
|
||||
let http = FakeHttpClient::with_404_response();
|
||||
let user_id = self.app_state.db.create_user(name, false).await.unwrap();
|
||||
let client_name = name.to_string();
|
||||
let mut client = Client::new();
|
||||
let mut client = Client::new(http.clone());
|
||||
let server = self.server.clone();
|
||||
let connection_killers = self.connection_killers.clone();
|
||||
let forbid_connections = self.forbid_connections.clone();
|
||||
|
@ -2489,7 +2490,6 @@ mod tests {
|
|||
})
|
||||
});
|
||||
|
||||
let http = FakeHttpClient::new(|_| async move { Ok(surf::http::Response::new(404)) });
|
||||
client
|
||||
.authenticate_and_connect(&cx.to_async())
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue