MCPcopy Index your code
hub / github.com/apache/devlake / GetProjectCheck

Function GetProjectCheck

backend/server/api/project/project.go:65–77  ·  view source on GitHub ↗

@Summary Get project exist check @Description Get project exist check @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.

(c *gin.Context)

Source from the content-addressed store, hash-verified

63// @Failure 500 {string} errcode.Error "Internal Error"
64// @Router /projects/{projectName}/check [get]
65func GetProjectCheck(c *gin.Context) {
66 projectName := c.Param("projectName")
67
68 projectOutputCheck := &models.ApiProjectCheck{}
69 _, err := services.GetProject(projectName)
70 if err != nil {
71 projectOutputCheck.Exist = false
72 } else {
73 projectOutputCheck.Exist = true
74 }
75
76 shared.ApiOutputSuccess(c, projectOutputCheck, http.StatusOK) // //shared.ApiOutputSuccess(c, projectOutputCheck, http.StatusOK)
77}
78
79// @Summary Get list of projects
80// @Description GET /projects?page=1&pageSize=10

Callers

nothing calls this directly

Calls 1

GetProjectMethod · 0.80

Tested by

no test coverage detected