Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Restored getProjectEnv to return object instead of array
Browse files Browse the repository at this point in the history
  • Loading branch information
hanzlamateen committed Jun 10, 2024
1 parent a20986c commit 188ea24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/server-core/src/projects/project/project-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,9 @@ export const getProjectEnv = async (app: Application, projectName: string) => {

const projectSetting = project.data?.[0]?.settings || []

return projectSetting
const settings = {}
Object.values(projectSetting).map(({ key, value }) => (settings[key] = value))
return settings
}

export const checkUnfetchedSourceCommit = async (app: Application, sourceURL: string, params: ProjectParams) => {
Expand Down Expand Up @@ -718,8 +720,8 @@ export const getBranches = async (app: Application, url: string, params?: Projec
branch.name === repoResponse.data.default_branch
? 'main'
: branch.name === `${config.server.releaseName}-deployment`
? 'deployment'
: 'generic'
? 'deployment'
: 'generic'
}
})
)
Expand Down

0 comments on commit 188ea24

Please sign in to comment.