Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: debugging code for adding repo
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Aug 16, 2024
1 parent c40450b commit 9d41384
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/app/account/repo/add/action.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ export async function getRepo(prevState, formData) {
const response = await getRepoApi(url, user.accounts[0].access_token);

// if repo not found show error
if (!response || response.status !== 200)
if (!response || response.status !== 200) {
console.log(
"repo not found ------------>>>>",
url,
`...by user ${session.user.name}`,
);
return {
data: { url },
succcess: false,
errors: { url: ["GitHub repository not found"] },
};
}

// check if user has repo url already
let userRepo = await prisma.repository.findFirst({
Expand Down

0 comments on commit 9d41384

Please sign in to comment.