feat: create repo file if doesn't exist

This commit is contained in:
Aravinth Manivannan 2022-06-04 21:30:27 +05:30
parent d3066683da
commit db1d7657a7
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88

View file

@ -95,10 +95,18 @@ impl Ctx {
let msg = r.into(); let msg = r.into();
db.create_repository(&msg).await.unwrap(); db.create_repository(&msg).await.unwrap();
federate.create_repository(&msg).await.unwrap(); federate.create_repository(&msg).await.unwrap();
} else {
if !federate
.repository_exists(&r.name, &r.owner.username, r.hostname)
.await
.unwrap()
{
let msg = r.into();
federate.create_repository(&msg).await.unwrap();
}
} }
} }
// sleep_fut.await.unwrap();
page += 1; page += 1;
} }
federate.tar().await.unwrap(); federate.tar().await.unwrap();