wabbajack/Wabbajack.BuildServer/Controllers/ListValidation.cs

29 lines
780 B
C#
Raw Normal View History

2020-01-08 04:41:50 +00:00
using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using MongoDB.Driver;
using MongoDB.Driver.Linq;
using Wabbajack.BuildServer.Models;
using Wabbajack.Lib.ModListRegistry;
namespace Wabbajack.BuildServer.Controllers
{
[ApiController]
[Route("/lists")]
public class ListValidation : AControllerBase<ListValidation>
{
public ListValidation(ILogger<ListValidation> logger, DBContext db) : base(logger, db)
{
}
[HttpGet]
2020-01-09 13:36:27 +00:00
[Route("status.json")]
2020-01-08 04:41:50 +00:00
public async Task<IList<ModlistSummary>> HandleGetLists()
{
return await Db.ModListStatus.AsQueryable().Select(m => m.Summary).ToListAsync();
}
}
}