Add campaigns page

This commit is contained in:
2025-11-05 10:38:15 +09:00
parent af920ebb1a
commit 9101d1bf4c
5 changed files with 141 additions and 2 deletions

View File

@ -11,6 +11,12 @@ namespace Hcs.WebApp.Services
return await context.Campaigns.AnyAsync(x => x.Type == type && !x.EndedAt.HasValue);
}
public async Task<IEnumerable<Campaign>> GetCampaignsAsync()
{
using var context = GetNewContext();
return await context.Campaigns.ToListAsync();
}
public async Task<IEnumerable<Campaign>> GetNotEndedCampaignsAsync()
{
using var context = GetNewContext();