feat: add repo validation

This commit is contained in:
2026-01-20 15:58:10 -08:00
parent 856bde3d97
commit 43c9b7c238
8 changed files with 83 additions and 23 deletions

View File

@@ -73,11 +73,14 @@
},
body: JSON.stringify({
id: repo.id.toString(),
name: repo.full_name
full_name: repo.full_name
})
});
const data = await response.json();
if (!response.ok) {
toast.warning('Repository already imported');
toast.warning(data.error);
adding = null;
return;
} else {
toast.success('Successfully added repository');
}