remove legacy renderer
This commit is contained in:
@@ -10,7 +10,6 @@ using zero.Core.Entities;
|
||||
using zero.Core.Identity;
|
||||
using zero.Core.Mapper;
|
||||
using zero.Core.Options;
|
||||
using zero.Core.Renderer;
|
||||
using zero.Web.Filters;
|
||||
using zero.Web.Models;
|
||||
|
||||
@@ -57,13 +56,7 @@ namespace zero.Web.Controllers
|
||||
/// <summary>
|
||||
/// Creates an edit model with appropriate options and permissions
|
||||
/// </summary>
|
||||
public JsonResult Edit<T>(T data, bool typed = true, Action<dynamic> transform = null) where T : IZeroEntity => Edit(data, null, typed, transform);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates an edit model with appropriate options and permissions
|
||||
/// </summary>
|
||||
public JsonResult Edit<T>(T data, IRenderer<T> renderer, bool typed = true, Action<dynamic> transform = null) where T : IZeroEntity
|
||||
public JsonResult Edit<T>(T data, bool typed = true, Action<dynamic> transform = null) where T : IZeroEntity
|
||||
{
|
||||
Type type = typeof(T);
|
||||
bool canBeShared = AppAwareShareableType.IsAssignableFrom(type);
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using zero.Core.Identity;
|
||||
using zero.Core.Renderer;
|
||||
|
||||
namespace zero.Web.Controllers
|
||||
{
|
||||
[ZeroAuthorize]
|
||||
public class RendererController : BackofficeController
|
||||
{
|
||||
/// <summary>
|
||||
/// Get a renderer by alias
|
||||
/// </summary>
|
||||
public IActionResult GetByAlias([FromServices] IEnumerable<IRenderer> renderers, [FromQuery] string alias)
|
||||
{
|
||||
IRenderer renderer = renderers.FirstOrDefault(x => x.Alias == alias);
|
||||
RendererConfig config = renderer?.Build();
|
||||
|
||||
return Json(config, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user