diff --git a/ee/tabby-webserver/src/integrations/github.rs b/ee/tabby-webserver/src/integrations/github.rs index a0dd22e42d70..af70237253c8 100644 --- a/ee/tabby-webserver/src/integrations/github.rs +++ b/ee/tabby-webserver/src/integrations/github.rs @@ -12,13 +12,28 @@ use serde::Deserialize; use tracing::error; use url::Url; -use crate::{ - oauth::github::GithubOAuthResponse, - schema::{ - github_repository_provider::GithubRepositoryProviderService, setting::SettingService, - }, +use crate::schema::{ + github_repository_provider::GithubRepositoryProviderService, setting::SettingService, }; +#[derive(Debug, Deserialize)] +#[allow(dead_code)] +struct GithubOAuthResponse { + #[serde(default)] + access_token: String, + #[serde(default)] + scope: String, + #[serde(default)] + token_type: String, + + #[serde(default)] + error: String, + #[serde(default)] + error_description: String, + #[serde(default)] + error_uri: String, +} + #[derive(Deserialize)] struct CallbackParams { state: ID, diff --git a/ee/tabby-webserver/src/integrations.rs b/ee/tabby-webserver/src/integrations/mod.rs similarity index 100% rename from ee/tabby-webserver/src/integrations.rs rename to ee/tabby-webserver/src/integrations/mod.rs diff --git a/ee/tabby-webserver/src/oauth/github.rs b/ee/tabby-webserver/src/oauth/github.rs index 32d9c7e598ed..c7faefe57d8c 100644 --- a/ee/tabby-webserver/src/oauth/github.rs +++ b/ee/tabby-webserver/src/oauth/github.rs @@ -9,20 +9,20 @@ use crate::schema::auth::{AuthenticationService, OAuthCredential, OAuthProvider} #[derive(Debug, Deserialize)] #[allow(dead_code)] -pub struct GithubOAuthResponse { +struct GithubOAuthResponse { #[serde(default)] - pub access_token: String, + access_token: String, #[serde(default)] - pub scope: String, + scope: String, #[serde(default)] - pub token_type: String, + token_type: String, #[serde(default)] - pub error: String, + error: String, #[serde(default)] - pub error_description: String, + error_description: String, #[serde(default)] - pub error_uri: String, + error_uri: String, } #[derive(Debug, Deserialize)]