18 lines
506 B
Rust
18 lines
506 B
Rust
use crate::{
|
|
AppService,
|
|
error::AppError,
|
|
user::chpc::{ContributionHeatmapQuery, ContributionHeatmapResponse},
|
|
};
|
|
|
|
impl AppService {
|
|
pub async fn users_chpc_by_username(
|
|
&self,
|
|
username: &str,
|
|
query: ContributionHeatmapQuery,
|
|
) -> Result<ContributionHeatmapResponse, AppError> {
|
|
let user = self.users_find_active_user_by_username(username).await?;
|
|
self.user_contribution_heatmap_for_user(user.id, user.username, query)
|
|
.await
|
|
}
|
|
}
|