mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
tweak List max lengths, add v1 versioning
This commit is contained in:
parent
a59dc92259
commit
b79354e097
2 changed files with 5 additions and 5 deletions
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
namespace FilterLists.Api.Controllers
|
||||
{
|
||||
[Route("[controller]")]
|
||||
//TODO: automate URL versioning
|
||||
[Route("v1/[controller]")]
|
||||
public class ListsController : Controller
|
||||
{
|
||||
private readonly IListService _listService;
|
||||
|
|
@ -15,7 +16,7 @@ public ListsController(IListService listService)
|
|||
|
||||
// GET lists
|
||||
[HttpGet]
|
||||
public JsonResult Get()
|
||||
public IActionResult Get()
|
||||
{
|
||||
var result = Json(_listService.GetAll());
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace FilterLists.Models
|
||||
{
|
||||
public class List : BaseEntity
|
||||
{
|
||||
[MaxLength(512)]
|
||||
[MaxLength(1022)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[MaxLength(2083)]
|
||||
|
|
@ -32,7 +31,7 @@ public class List : BaseEntity
|
|||
[MinLength(6)]
|
||||
public string IssuesUrl { get; set; }
|
||||
|
||||
[MaxLength(64)]
|
||||
[MaxLength(510)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
|
|
|
|||
Loading…
Reference in a new issue