Add campaigns page
This commit is contained in:
@ -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();
|
||||
|
||||
Reference in New Issue
Block a user