code: func (c *EventsController) List(ctx *app.ListWorkItemEventsContext) error {
  	var eventList event.List
  	err := application.Transactional(c.db, func(appl application.Application) error {
  		var err error
  		eventList, err = appl.Events().List(ctx, ctx.WiID)
  		if err != nil {
  			return errs.Wrap(err, "list events model failed")
  		}
  		if ctx.RevisionID != nil {
  			eventList = eventList.FilterByRevisionID(*ctx.RevisionID)
  		}
  		return nil
  	})
  
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  
  	var convertedEvents []*app.Event
  	return ctx.ConditionalEntities(eventList, c.config.GetCacheControlEvents, func() error {
  		convertedEvents, err = ConvertEvents(ctx, c.db, ctx.Request, eventList, ctx.WiID)
  		if err != nil {
  			return jsonapi.JSONErrorResponse(ctx, errs.Wrapf(err, "failed to convert events"))
  		}
  		return ctx.OK(&app.EventList{
  			Data: convertedEvents,
  		})
  	})
  }
docs: // List runs the list action.