MCPcopy Index your code
hub / github.com/emwalker/digraph / call

Method call

backend/src/git/account.rs:16–36  ·  view source on GitHub ↗
(&self, update: &Mutation)

Source from the content-addressed store, hash-verified

14
15impl DeleteAccount {
16 pub fn call(&self, update: &Mutation) -> Result<()> {
17 if self.actor.user_id != self.user_id {
18 return Err(Error::Repo("not allowed to do that".into()));
19 }
20
21 log::warn!("deleting repos for {}", self.user_id);
22
23 let wiki = RepoId::wiki();
24 for repo in self.personal_repos.iter() {
25 if repo == &wiki {
26 return Err(Error::Repo(format!("not allowed to delete {wiki}")));
27 }
28 }
29
30 for &repo_id in self.personal_repos.iter() {
31 update.delete_repo(repo_id)?;
32 }
33 log::warn!("personal repos of {} have been deleted", self.user_id);
34
35 Ok(())
36 }
37}
38
39pub struct EnsurePersonalRepo {

Callers

nothing calls this directly

Calls 9

RepoClass · 0.85
delete_repoMethod · 0.80
root_topic_idMethod · 0.80
existsMethod · 0.80
save_topicMethod · 0.80
iterMethod · 0.45
is_emptyMethod · 0.45
repoMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected