From 74d8154843601357ba6786d2d038da4e28254c0a Mon Sep 17 00:00:00 2001 From: DomWane Date: Thu, 19 Sep 2024 17:57:00 +0200 Subject: [PATCH] fix: data post api --- server/api/data.post.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/api/data.post.ts b/server/api/data.post.ts index 80b0b17..7e5e74c 100644 --- a/server/api/data.post.ts +++ b/server/api/data.post.ts @@ -5,7 +5,7 @@ import type { Project } from '~/types' export default defineEventHandler(async (event) => { const body = await readBody<{ project: Project, image?: { type: string, data: string } }>(event) const yamlProject = yaml.stringify(body.project) - const { appId, privateKey, installationId } = useAppConfig().github + const { appId, privateKey, installationId, baseBranch, owner, repo } = useRuntimeConfig().app.github const id = body.project.id || body.project.name.toLowerCase().replace(/\s+/g, '-') @@ -16,9 +16,6 @@ export default defineEventHandler(async (event) => { await app.octokit.rest.apps.getAuthenticated() const octokit = await app.getInstallationOctokit(installationId) - const owner = 'develit-io' - const repo = 'test-repo' - const baseBranch = 'main' const newBranchName = `${id}-project-update-${Date.now()}` const commitMessage = `${body.project.id ? `Updating the project: ${body.project.name}` : `Initiating the creation of project: ${body.project.name}`}`