refactor: adjust queries

This commit is contained in:
Mauricio Siu
2025-02-15 23:01:36 -06:00
parent 78c72b6337
commit 515d65d993
23 changed files with 538 additions and 138 deletions

View File

@@ -12,14 +12,14 @@ import { updatePreviewDeployment } from "./preview-deployment";
export type Github = typeof github.$inferSelect;
export const createGithub = async (
input: typeof apiCreateGithub._type,
userId: string,
organizationId: string,
) => {
return await db.transaction(async (tx) => {
const newGitProvider = await tx
.insert(gitProvider)
.values({
providerType: "github",
userId: userId,
organizationId: organizationId,
name: input.name,
})
.returning()