DeleteByID delete a userExample by id @Summary Delete a userExample by id @Description Deletes a existing userExample identified by the given id in the path. @Tags userExample @Accept json @Produce json @Param id path string true "id" @Success 200 {object} types.DeleteUserExampleByIDReply{} @Router
(c *gin.Context)
| 93 | // @Router /api/v1/userExample/{id} [delete] |
| 94 | // @Security BearerAuth |
| 95 | func (h *userExampleHandler) DeleteByID(c *gin.Context) { |
| 96 | _, id, isAbort := getUserExampleIDFromPath(c) |
| 97 | if isAbort { |
| 98 | response.Error(c, ecode.InvalidParams) |
| 99 | return |
| 100 | } |
| 101 | |
| 102 | ctx := middleware.WrapCtx(c) |
| 103 | err := h.iDao.DeleteByID(ctx, id) |
| 104 | if err != nil { |
| 105 | logger.Error("DeleteByID error", logger.Err(err), logger.Any("id", id), middleware.GCtxRequestIDField(c)) |
| 106 | response.Output(c, ecode.InternalServerError.ToHTTPCode()) |
| 107 | return |
| 108 | } |
| 109 | |
| 110 | response.Success(c) |
| 111 | } |
| 112 | |
| 113 | // UpdateByID update a userExample by id |
| 114 | // @Summary Update a userExample by id |
nothing calls this directly
no test coverage detected