feat(backend): add communication, tester, admin and middleman modules
Implement step 17 modules: threads/messages, notifications with automation (submission.created, idea.created, grant_call.opened), innovation test feedback, admin panel (submissions, verify, metrics, grant call status), Middleman adaptation and partnerships. Split multi-type files into one type per file and replace object-valued dictionaries with string-valued maps in data contracts (migrations 0006/0007).
This commit is contained in:
@@ -17,11 +17,16 @@ public class IdeasController : ControllerBase
|
||||
{
|
||||
private readonly IIdeaService _ideaService;
|
||||
private readonly IIdeaAssistant _ideaAssistant;
|
||||
private readonly INotificationService _notifications;
|
||||
|
||||
public IdeasController(IIdeaService ideaService, IIdeaAssistant ideaAssistant)
|
||||
public IdeasController(
|
||||
IIdeaService ideaService,
|
||||
IIdeaAssistant ideaAssistant,
|
||||
INotificationService notifications)
|
||||
{
|
||||
_ideaService = ideaService;
|
||||
_ideaAssistant = ideaAssistant;
|
||||
_notifications = notifications;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -38,6 +43,16 @@ public class IdeasController : ControllerBase
|
||||
|
||||
var created = await _ideaService.CreateAsync(userId, request, cancellationToken);
|
||||
|
||||
await _notifications.NotifyStaffAsync(
|
||||
"idea.created",
|
||||
new Dictionary<string, string?>
|
||||
{
|
||||
["ideaId"] = created.Id,
|
||||
["title"] = created.Title,
|
||||
["authorId"] = created.AuthorId,
|
||||
},
|
||||
cancellationToken);
|
||||
|
||||
return CreatedAtAction(nameof(GetById), new { ideaId = created.Id }, created);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user