mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 10:20:51 +00:00
Switch CreateWorktreeResponse::worktree_id
to be a i32
Apparently all IDs in `sqlx` on the server are represented as i32s.
This commit is contained in:
parent
20542f54ef
commit
4efebdaa52
2 changed files with 3 additions and 3 deletions
|
@ -2,6 +2,6 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct CreateWorktreeResponse {
|
||||
pub worktree_id: u64,
|
||||
pub worktree_id: i32,
|
||||
pub rpc_address: String,
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ pub fn init(cx: &mut MutableAppContext) {
|
|||
fn share_worktree(_: &(), cx: &mut MutableAppContext) {
|
||||
let zed_url = std::env::var("ZED_SERVER_URL").unwrap_or("https://zed.dev".to_string());
|
||||
cx.spawn::<_, _, surf::Result<()>>(|cx| async move {
|
||||
let (user_id, access_token) = login(zed_url.clone(), cx).await?;
|
||||
let (user_id, access_token) = login(zed_url.clone(), &cx).await?;
|
||||
|
||||
let mut response = surf::post(format!("{}/api/worktrees", &zed_url))
|
||||
.header(
|
||||
|
@ -70,7 +70,7 @@ fn share_worktree(_: &(), cx: &mut MutableAppContext) {
|
|||
.detach();
|
||||
}
|
||||
|
||||
fn login(zed_url: String, cx: AsyncAppContext) -> Task<Result<(String, String)>> {
|
||||
fn login(zed_url: String, cx: &AsyncAppContext) -> Task<Result<(String, String)>> {
|
||||
let platform = cx.platform();
|
||||
cx.background_executor().spawn(async move {
|
||||
if let Some((user_id, access_token)) = platform.read_credentials(&zed_url) {
|
||||
|
|
Loading…
Reference in a new issue