Skip to content

Commit

Permalink
Fixed user_exists on GH
Browse files Browse the repository at this point in the history
  • Loading branch information
Daguis committed May 20, 2024
1 parent e7f9d2a commit 3389b3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backend/src/provider/github/api/get_user_exists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ pub enum UserExistsError {

//https://api.github.com/users/daguis
pub async fn get_user_exists_impl(
owner: String,
repo: String,
user_id: String,
github_token: String,
) -> Result<String, UserExistsError> {
Expand Down
8 changes: 7 additions & 1 deletion backend/src/provider/github/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ impl IGithubClient for GithubClient {
get_is_merged_impl(self.owner.clone(), self.repo.clone(), pr_nbr).await
}
async fn get_user_exists(&self, user_id: String) -> Result<String, UserExistsError> {
get_user_exists_impl(self.github_token.clone(), user_id.clone()).await
get_user_exists_impl(
self.owner.clone(),
self.repo.clone(),
user_id,
self.github_token.clone(),
)
.await
}
async fn get_merged_details(&self, pr_nbr: i32) -> Result<PrDetailsResponse, MergeDetailsErr> {
get_merge_details_impl(
Expand Down

0 comments on commit 3389b3b

Please sign in to comment.