diff --git a/src/lib/dokploy.ts b/src/lib/dokploy.ts index 1664aaf..a355569 100644 --- a/src/lib/dokploy.ts +++ b/src/lib/dokploy.ts @@ -134,54 +134,54 @@ export function createDokployClient(config: DokployConfig) { async function saveGiteaProvider(input: { applicationId: string - giteaOwner: string - giteaRepository: string - giteaBranch: string - giteaBuildPath?: string | null - giteaId?: string | null + owner: string + repository: string + branch: string + buildPath?: string | null + id?: string | null }): Promise { await call('/application.saveGiteaProvider', { applicationId: input.applicationId, - giteaOwner: input.giteaOwner, - giteaRepository: input.giteaRepository, - giteaBranch: input.giteaBranch, - giteaBuildPath: input.giteaBuildPath ?? '/', - giteaId: input.giteaId ?? null, + owner: input.owner, + repository: input.repository, + branch: input.branch, + buildPath: input.buildPath ?? '/', + id: input.id ?? null, }) } async function saveGitProvider(input: { applicationId: string - gitProviderOwner?: string | null - gitProviderRepository?: string | null - gitProviderBranch?: string - gitProviderBuildPath?: string | null - gitProviderId?: string | null + owner?: string | null + repository?: string | null + branch?: string + buildPath?: string | null + id?: string | null }): Promise { await call('/application.saveGitProvider', { applicationId: input.applicationId, - gitProviderOwner: input.gitProviderOwner ?? null, - gitProviderRepository: input.gitProviderRepository ?? null, - gitProviderBranch: input.gitProviderBranch ?? 'main', - gitProviderBuildPath: input.gitProviderBuildPath ?? '/', - gitProviderId: input.gitProviderId ?? null, + owner: input.owner ?? null, + repository: input.repository ?? null, + branch: input.branch ?? 'main', + buildPath: input.buildPath ?? '/', + id: input.id ?? null, }) } async function saveGithubProvider(input: { applicationId: string - githubOwner: string - githubRepository: string - githubBranch: string - githubBuildPath?: string | null + owner: string + repository: string + branch: string + buildPath?: string | null githubId?: string | null }): Promise { await call('/application.saveGithubProvider', { applicationId: input.applicationId, - githubOwner: input.githubOwner, - githubRepository: input.githubRepository, - githubBranch: input.githubBranch, - githubBuildPath: input.githubBuildPath ?? '/', + owner: input.owner, + repository: input.repository, + branch: input.branch, + buildPath: input.buildPath ?? '/', githubId: input.githubId ?? null, }) } @@ -293,27 +293,27 @@ export function createDokployClient(config: DokployConfig) { if (input.gitProvider === 'github' || input.gitRepo.includes('github.com')) { await saveGithubProvider({ applicationId: app.applicationId, - githubOwner: owner, - githubRepository: repo, - githubBranch: input.gitBranch, - githubBuildPath: input.buildPath ?? '/', + owner, + repository: repo, + branch: input.gitBranch, + buildPath: input.buildPath ?? '/', }) } else if (input.gitProvider === 'gitea' || input.gitRepo.includes('git.dfmpanel.eu')) { await saveGiteaProvider({ applicationId: app.applicationId, - giteaOwner: owner, - giteaRepository: repo, - giteaBranch: input.gitBranch, - giteaBuildPath: input.buildPath ?? '/', + owner, + repository: repo, + branch: input.gitBranch, + buildPath: input.buildPath ?? '/', }) } else { // Generic git await saveGitProvider({ applicationId: app.applicationId, - gitProviderOwner: owner, - gitProviderRepository: repo, - gitProviderBranch: input.gitBranch, - gitProviderBuildPath: input.buildPath ?? '/', + owner, + repository: repo, + branch: input.gitBranch, + buildPath: input.buildPath ?? '/', }) }