mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(directory): ♻ mv ListVm to shared contracts
This commit is contained in:
parent
9cb9cc1cf6
commit
cc4a0b97a0
3 changed files with 18 additions and 13 deletions
|
|
@ -22,7 +22,7 @@ public ListsController(IMemoryCache cache, IMediator mediator) : base(cache)
|
|||
}
|
||||
|
||||
[HttpGet]
|
||||
[ProducesResponseType(typeof(IEnumerable<GetLists.ListVm>), (int)HttpStatusCode.OK)]
|
||||
[ProducesResponseType(typeof(IEnumerable<ListVm>), (int)HttpStatusCode.OK)]
|
||||
[ProducesResponseType((int)HttpStatusCode.NotFound)]
|
||||
public async Task<IActionResult> Get(CancellationToken cancellationToken)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
using AutoMapper.QueryableExtensions;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Context;
|
||||
using FilterLists.Directory.Infrastructure.Persistence.Queries.Entities;
|
||||
using FilterLists.SharedKernel.Apis.Contracts.Directory;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
|
@ -58,17 +59,5 @@ public ListVmProfile()
|
|||
fl.FilterListMaintainers.Select(flm => flm.MaintainerId).OrderBy(mid => mid)));
|
||||
}
|
||||
}
|
||||
|
||||
public class ListVm
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; private set; } = null!;
|
||||
public string? Description { get; private set; }
|
||||
public int? LicenseId { get; private set; }
|
||||
public IEnumerable<int>? SyntaxIds { get; private set; }
|
||||
public IEnumerable<string>? Iso6391s { get; private set; }
|
||||
public IEnumerable<int>? TagIds { get; private set; }
|
||||
public IEnumerable<int>? MaintainerIds { get; private set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace FilterLists.SharedKernel.Apis.Contracts.Directory
|
||||
{
|
||||
public class ListVm
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
public string Name { get; private set; } = null!;
|
||||
public string? Description { get; private set; }
|
||||
public int? LicenseId { get; private set; }
|
||||
public IEnumerable<int>? SyntaxIds { get; private set; }
|
||||
public IEnumerable<string>? Iso6391s { get; private set; }
|
||||
public IEnumerable<int>? TagIds { get; private set; }
|
||||
public IEnumerable<int>? MaintainerIds { get; private set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue