Add notification alias to document notifications endpoint output (#17028)
This commit is contained in:
committed by
Jacob Overgaard
parent
d12dedb526
commit
e6f379034f
@@ -27,13 +27,14 @@ internal sealed class DocumentNotificationPresentationFactory : IDocumentNotific
|
||||
.ToArray()
|
||||
?? Array.Empty<string>();
|
||||
|
||||
var availableActionIds = _actionCollection.Where(a => a.ShowInNotifier).Select(a => a.Letter.ToString()).ToArray();
|
||||
|
||||
return await Task.FromResult(
|
||||
availableActionIds.Select(actionId => new DocumentNotificationResponseModel
|
||||
return await Task.FromResult(_actionCollection
|
||||
.Where(action => action.ShowInNotifier)
|
||||
.Select(action => new DocumentNotificationResponseModel
|
||||
{
|
||||
ActionId = actionId,
|
||||
Subscribed = subscribedActionIds.Contains(actionId)
|
||||
}).ToArray());
|
||||
ActionId = action.Letter,
|
||||
Alias = action.Alias,
|
||||
Subscribed = subscribedActionIds.Contains(action.Letter)
|
||||
})
|
||||
.ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36279,6 +36279,7 @@
|
||||
"DocumentNotificationResponseModel": {
|
||||
"required": [
|
||||
"actionId",
|
||||
"alias",
|
||||
"subscribed"
|
||||
],
|
||||
"type": "object",
|
||||
@@ -36286,6 +36287,9 @@
|
||||
"actionId": {
|
||||
"type": "string"
|
||||
},
|
||||
"alias": {
|
||||
"type": "string"
|
||||
},
|
||||
"subscribed": {
|
||||
"type": "boolean"
|
||||
}
|
||||
|
||||
@@ -4,5 +4,7 @@ public class DocumentNotificationResponseModel
|
||||
{
|
||||
public required string ActionId { get; set; }
|
||||
|
||||
public required string Alias { get; set; }
|
||||
|
||||
public required bool Subscribed { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user