creating a raid from a template now creates discord messages
This commit is contained in:
parent
893ec1f16d
commit
601b6b87ed
1 changed files with 4 additions and 2 deletions
|
@ -7,10 +7,12 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IDbContextFactory<LiebContext> _contextFactory;
|
private readonly IDbContextFactory<LiebContext> _contextFactory;
|
||||||
|
private readonly RaidService _raidSerive;
|
||||||
|
|
||||||
public RaidTemplateService(IDbContextFactory<LiebContext> contextFactory)
|
public RaidTemplateService(IDbContextFactory<LiebContext> contextFactory, RaidService raidSerice)
|
||||||
{
|
{
|
||||||
_contextFactory = contextFactory;
|
_contextFactory = contextFactory;
|
||||||
|
_raidSerive = raidSerice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<RaidTemplate> GetTemplates()
|
public List<RaidTemplate> GetTemplates()
|
||||||
|
@ -86,7 +88,7 @@ namespace Lieb.Data
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Raid raid = new Raid(template);
|
Raid raid = new Raid(template);
|
||||||
context.Raids.Add(raid);
|
await _raidSerive.AddOrEditRaid(raid, null, null, null, template.RaidOwnerId);
|
||||||
MoveTemplate(template);
|
MoveTemplate(template);
|
||||||
await context.SaveChangesAsync();
|
await context.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue