fix: GitHub fixes

This commit is contained in:
Andras Bacsai
2022-05-31 13:57:42 +02:00
parent b032da798b
commit 6529271de2
3 changed files with 4 additions and 10 deletions

View File

@@ -67,16 +67,10 @@ export async function getSource({
return body;
}
export async function addGitHubSource({ id, teamId, type, name, htmlUrl, apiUrl, organization }) {
await prisma.gitSource.update({
return await prisma.gitSource.update({
where: { id },
data: { type, name, htmlUrl, apiUrl, organization }
});
return await prisma.githubApp.create({
data: {
teams: { connect: { id: teamId } },
gitSource: { connect: { id } }
}
});
}
export async function addGitLabSource({
id,