a06673b
use uuid::Uuid;
use crate::error::IssueResult;
use crate::features::IssueService;
use super::StopwatchView;
use super::usecase;
impl IssueService {
pub async fn get_my_stopwatch(
&self,
actor: Uuid,
_channel_id: Uuid,
issue_id: Uuid,
) -> IssueResult<StopwatchView> {
usecase::load_my_stopwatch(self, issue_id, actor)
.await
.map(StopwatchView::from)
}
pub async fn start_watch(
&self,
actor: Uuid,
channel_id: Uuid,
issue_id: Uuid,
) -> IssueResult<StopwatchView> {
usecase::start_watch(self, actor, channel_id, issue_id).await
}
pub async fn stop_watch(
&self,
actor: Uuid,
channel_id: Uuid,
issue_id: Uuid,
) -> IssueResult<()> {
usecase::stop_watch(self, actor, channel_id, issue_id).await
}
}