@Summary get blueprints @Description get blueprints @Tags framework/blueprints @Accept application/json @Param blueprintId path int true "blueprint id" @Success 200 {object} models.Blueprint @Failure 400 {object} shared.ApiBody "Bad Request" @Failure 500 {object} shared.ApiBody "Internal Error" @
(c *gin.Context)
| 95 | // @Failure 500 {object} shared.ApiBody "Internal Error" |
| 96 | // @Router /blueprints/{blueprintId} [get] |
| 97 | func Get(c *gin.Context) { |
| 98 | blueprintId := c.Param("blueprintId") |
| 99 | id, err := strconv.ParseUint(blueprintId, 10, 64) |
| 100 | if err != nil { |
| 101 | shared.ApiOutputError(c, errors.BadInput.Wrap(err, "bad blueprintId format supplied")) |
| 102 | return |
| 103 | } |
| 104 | blueprint, err := services.GetBlueprint(id, true) |
| 105 | if err != nil { |
| 106 | shared.ApiOutputError(c, errors.Default.Wrap(err, "error getting blueprint")) |
| 107 | return |
| 108 | } |
| 109 | shared.ApiOutputSuccess(c, blueprint, http.StatusOK) |
| 110 | } |
| 111 | |
| 112 | // // @Summary delete blueprints |
| 113 | // // @Description Delete BluePrints |
nothing calls this directly
no test coverage detected