func (c *WorkitemtypeController) Show(ctx *app.ShowWorkitemtypeContext) error {
	spaceID, err := uuid.FromString(ctx.ID)
	if err != nil {
		return errors.NewNotFoundError("spaceID", ctx.ID)
	}

	return application.Transactional(c.db, func(appl application.Application) error {
		witModel, err := appl.WorkItemTypes().Load(ctx.Context, spaceID, ctx.WitID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*witModel, c.config.GetCacheControlWorkItemType, func() error {
			witData := ConvertWorkItemTypeFromModel(ctx.RequestData, witModel)
			wit := &app.WorkItemTypeSingle{Data: &witData}
			return ctx.OK(wit)
		})
	})
}
// Show runs the show action.
Show runs the show action.
// Show runs the show action .
func (c *WorkitemtypeController) Show(ctx *app.ShowWorkitemtypeContext) error {
	spaceID, err := uuid.FromString(ctx.ID)
	if err != nil {
		return errors.NewNotFoundError("spaceID", ctx.ID)
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		witModel, err := appl.WorkItemTypes().Load(ctx.Context, spaceID, ctx.WitID)
		if err != nil {
			return jsonapi.JSONErrorResponse(ctx, err)
		}
		return ctx.ConditionalEntity(*witModel, c.config.GetCacheControlWorkItemType, func() error {
			witData := ConvertWorkItemTypeFromModel(ctx.RequestData, witModel)
			wit := &app.WorkItemTypeSingle{Data: &witData}
			return ctx.OK(wit)
		})
	})
}
func ( c * WorkitemtypeController ) Show ( ctx * app . ShowWorkitemtypeContext ) error { spaceID , err := uuid . FromString ( ctx . ID ) if err != nil { return errors . NewNotFoundError ( " " , ctx . ID ) } return application . Transactional ( c . db , func ( appl application . Application ) error { witModel , err := appl . WorkItemTypes ( ) . Load ( ctx . Context , spaceID , ctx . WitID ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , err ) } return ctx . ConditionalEntity ( * witModel , c . config . GetCacheControlWorkItemType , func ( ) error { witData := ConvertWorkItemTypeFromModel ( ctx . RequestData , witModel ) wit := & app . WorkItemTypeSingle { Data : & witData } return ctx . OK ( wit ) } ) } ) }
Show runs the show action.
Show runs the show action .