Skip to content

Commit

Permalink
fix: error caused by switching to computed UserRepoData.id (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihebi authored Feb 27, 2023
1 parent 0338ca3 commit d577eb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions api/src/resolver_repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ async function updateUserRepoData({ userId, repoId }) {
if (!repoData) {
await prisma.userRepoData.create({
data: {
id: await nanoid(),
user: { connect: { id: userId } },
repo: { connect: { id: repoId } },
},
});
} else {
await prisma.userRepoData.update({
await prisma.userRepoData.updateMany({
where: {
id: repoData.id,
user: { id: userId },
repo: { id: repoId },
},
data: {
dummyCount: { increment: 1 },
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/repos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function MyRepos() {
return <CircularProgress />;
}
if (error) {
return null;
return <Box>ERROR: {error.message}</Box>;
}
const repos = data.myRepos.slice();
return (
Expand Down Expand Up @@ -339,7 +339,7 @@ function SharedWithMe() {
return <CircularProgress />;
}
if (error) {
return null;
return <Box>ERROR: {error.message}</Box>;
}
const repos = data.myCollabRepos.slice();
return (
Expand Down

0 comments on commit d577eb0

Please sign in to comment.