From 601b6b87edccb813eb5178c1247e0ef3a718048b Mon Sep 17 00:00:00 2001 From: Sarah Faey Date: Wed, 30 Nov 2022 18:11:06 +0100 Subject: [PATCH] creating a raid from a template now creates discord messages --- Lieb/Data/RaidTemplateService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Lieb/Data/RaidTemplateService.cs b/Lieb/Data/RaidTemplateService.cs index 552345d..7e2c7c5 100644 --- a/Lieb/Data/RaidTemplateService.cs +++ b/Lieb/Data/RaidTemplateService.cs @@ -7,10 +7,12 @@ namespace Lieb.Data { private readonly IDbContextFactory _contextFactory; + private readonly RaidService _raidSerive; - public RaidTemplateService(IDbContextFactory contextFactory) + public RaidTemplateService(IDbContextFactory contextFactory, RaidService raidSerice) { _contextFactory = contextFactory; + _raidSerive = raidSerice; } public List GetTemplates() @@ -86,7 +88,7 @@ namespace Lieb.Data return; } Raid raid = new Raid(template); - context.Raids.Add(raid); + await _raidSerive.AddOrEditRaid(raid, null, null, null, template.RaidOwnerId); MoveTemplate(template); await context.SaveChangesAsync(); }