MCPcopy
hub / github.com/apache/devlake / GetProject

Function GetProject

backend/server/api/project/project.go:45–54  ·  view source on GitHub ↗

@Summary Get a project @Description Get a project @Tags framework/projects @Accept application/json @Param projectName path string true "project name" @Success 200 {object} models.ApiOutputProject @Failure 400 {string} errcode.Error "Bad Request" @Failure 500 {string} errcode.Error "Internal Erro

(c *gin.Context)

Source from the content-addressed store, hash-verified

43// @Failure 500 {string} errcode.Error "Internal Error"
44// @Router /projects/{projectName} [get]
45func GetProject(c *gin.Context) {
46 projectName := c.Param("projectName")
47
48 projectOutput, err := services.GetProject(projectName)
49 if err != nil {
50 shared.ApiOutputError(c, errors.Default.Wrap(err, "error getting project"))
51 return
52 }
53 shared.ApiOutputSuccess(c, projectOutput, http.StatusOK)
54}
55
56// @Summary Get project exist check
57// @Description Get project exist check

Callers

nothing calls this directly

Calls 2

GetProjectMethod · 0.80
WrapMethod · 0.80

Tested by

no test coverage detected