fix(sms): reject notification-list Type change on update (S6 review follow-up)
This commit is contained in:
@@ -1701,8 +1701,9 @@ public class ManagementActor : ReceiveActor
|
||||
var repo = sp.GetRequiredService<INotificationRepository>();
|
||||
var list = await repo.GetNotificationListByIdAsync(cmd.NotificationListId)
|
||||
?? throw new ManagementCommandException($"NotificationList with ID {cmd.NotificationListId} not found.");
|
||||
if (list.Type != cmd.Type)
|
||||
throw new ManagementCommandException("A notification list's Type cannot be changed after creation.");
|
||||
list.Name = cmd.Name;
|
||||
list.Type = cmd.Type;
|
||||
|
||||
var existingRecipients = await repo.GetRecipientsByListIdAsync(cmd.NotificationListId);
|
||||
foreach (var r in existingRecipients)
|
||||
|
||||
Reference in New Issue
Block a user