Add GhApiClient::has_gh_token

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-06-04 23:07:27 +10:00
parent 6b0f4602b9
commit 7e283cc407
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -163,6 +163,10 @@ impl GhApiClient {
} }
} }
pub fn has_gh_token(&self) -> bool {
self.get_auth_token().is_some()
}
async fn do_fetch<T, U, GraphQLFn, RestfulFn, GraphQLFut, RestfulFut>( async fn do_fetch<T, U, GraphQLFn, RestfulFn, GraphQLFut, RestfulFut>(
&self, &self,
graphql_func: GraphQLFn, graphql_func: GraphQLFn,