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,13 +17,16 @@ public class SubmissionsController : ControllerBase
|
||||
{
|
||||
private readonly ISubmissionService _submissionService;
|
||||
private readonly IMatchmakingService _matchmakingService;
|
||||
private readonly INotificationService _notifications;
|
||||
|
||||
public SubmissionsController(
|
||||
ISubmissionService submissionService,
|
||||
IMatchmakingService matchmakingService)
|
||||
IMatchmakingService matchmakingService,
|
||||
INotificationService notifications)
|
||||
{
|
||||
_submissionService = submissionService;
|
||||
_matchmakingService = matchmakingService;
|
||||
_notifications = notifications;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@@ -42,6 +45,16 @@ public class SubmissionsController : ControllerBase
|
||||
|
||||
await _matchmakingService.IndexSubmissionAsync(created.Id, cancellationToken);
|
||||
|
||||
await _notifications.NotifyStaffAsync(
|
||||
"submission.created",
|
||||
new Dictionary<string, string?>
|
||||
{
|
||||
["submissionId"] = created.Id,
|
||||
["title"] = created.Title,
|
||||
["authorId"] = created.AuthorId,
|
||||
},
|
||||
cancellationToken);
|
||||
|
||||
return CreatedAtAction(nameof(GetById), new { submissionId = created.Id }, created);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user