MCPcopy
hub / github.com/caprover/caprover / getProject

Method getProject

src/datastore/ProjectsDataStore.ts:125–143  ·  view source on GitHub ↗
(projectId: string)

Source from the content-addressed store, hash-verified

123 }
124
125 getProject(projectId: string): Promise<ProjectDefinition> {
126 const self = this
127 projectId = `${projectId || ''}`.trim()
128 return Promise.resolve()
129 .then(function () {
130 return self.data.get(`${PROJECTS_DEFINITIONS}.${projectId}`) as
131 | ProjectDefinition
132 | undefined
133 })
134 .then(function (project) {
135 if (!project) {
136 throw ApiStatusCodes.createError(
137 ApiStatusCodes.ILLEGAL_OPERATION,
138 'Project not found'
139 )
140 }
141 return project
142 })
143 }
144
145 organizeFromTheLeafsToRoot(input: ProjectDefinition[]) {
146 const projectMap = new Map<string, ProjectDefinition>()

Callers 3

deleteProjectMethod · 0.80
updateAppDefinitionMethod · 0.80

Calls 2

createErrorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected