Skip to content

Commit

Permalink
fix: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Aug 18, 2024
1 parent 5c37e1c commit 0de783e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controller/oauth/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ use futures::TryFutureExt;
use reqwest::Client;
use serde::{Deserialize, Serialize};

pub async fn oauth_callback(Query(query): Query<OauthCallbackQuery>) {
let data = get_oauth_login(query.token).await.unwrap();
pub async fn oauth_callback(Query(query): Query<OauthCallbackQuery>) -> Result<(), String> {
let data = get_oauth_login(query.token).await?;
activate_token(&query.state, data).await;

Ok(())
}

async fn get_oauth_login(token: String) -> Result<UserData, String> {
Expand Down

0 comments on commit 0de783e

Please sign in to comment.