feat: add repo validation
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user