(&self, ctx: &Context<'_>)
| 97 | } |
| 98 | |
| 99 | async fn repo(&self, ctx: &Context<'_>) -> Result<Repository> { |
| 100 | match ctx |
| 101 | .data_unchecked::<Store>() |
| 102 | .repo(self.0.repo_id.to_string()) |
| 103 | .await |
| 104 | { |
| 105 | Ok(Some(repo)) => Ok(repo), |
| 106 | _ => Err(Error::NotFound(format!( |
| 107 | "repo not found: {}", |
| 108 | self.0.repo_id |
| 109 | ))), |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | async fn viewer_can_update(&self, ctx: &Context<'_>) -> bool { |
| 114 | ctx.data_unchecked::<Store>() |