func (c *WorkItemLinkController) Delete(ctx *app.DeleteWorkItemLinkContext) error {
	currentUserIdentityID, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewUnauthorizedError(err.Error()))
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		linkCtx := newWorkItemLinkContext(ctx.Context, appl, c.db, ctx.RequestData, ctx.ResponseData, app.WorkItemLinkHref, currentUserIdentityID)
		return deleteWorkItemLink(linkCtx, ctx, ctx.LinkID)
	})
}
// Delete runs the delete action
Delete runs the delete action
// Delete runs the delete action
func (c *WorkItemLinkController) Delete(ctx *app.DeleteWorkItemLinkContext) error {
	currentUserIdentityID, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, errors.NewUnauthorizedError(err.Error()))
	}
	return application.Transactional(c.db, func(appl application.Application) error {
		linkCtx := newWorkItemLinkContext(ctx.Context, appl, c.db, ctx.RequestData, ctx.ResponseData, app.WorkItemLinkHref, currentUserIdentityID)
		return deleteWorkItemLink(linkCtx, ctx, ctx.LinkID)
	})
}
func ( c * WorkItemLinkController ) Delete ( ctx * app . DeleteWorkItemLinkContext ) error { currentUserIdentityID , err := login . ContextIdentity ( ctx ) if err != nil { return jsonapi . JSONErrorResponse ( ctx , errors . NewUnauthorizedError ( err . Error ( ) ) ) } return application . Transactional ( c . db , func ( appl application . Application ) error { linkCtx := newWorkItemLinkContext ( ctx . Context , appl , c . db , ctx . RequestData , ctx . ResponseData , app . WorkItemLinkHref , currentUserIdentityID ) return deleteWorkItemLink ( linkCtx , ctx , ctx . LinkID ) } ) }
Delete runs the delete action
Delete runs the delete action