feat(infra): project pendingConfirmation into feeds:list
saveMetadata now also upserts the list entry so the pendingConfirmation flag is reflected in the dashboard without an extra per-feed KV read. toListItemDTO gains an optional third parameter for the flag. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
79bb4902b9
commit
36d58ade48
4 files changed
+87
-6
No files matched your search
@@ -43,12 +43,17 @@ export function toConfigDTO(state: FeedState): FeedConfig {
|
||||
}
|
||||
|
||||
/** Domain state → the projection cached in the global `feeds:list` registry. */
|
||||
export function toListItemDTO(id: FeedId, state: FeedState): FeedListItem {
|
||||
export function toListItemDTO(
|
||||
id: FeedId,
|
||||
state: FeedState,
|
||||
pendingConfirmation = false,
|
||||
): FeedListItem {
|
||||
return {
|
||||
id: id.value,
|
||||
title: state.title,
|
||||
description: state.description,
|
||||
mailbox_id: state.mailboxId,
|
||||
expires_at: state.expiresAt,
|
||||
...(pendingConfirmation !== undefined ? { pendingConfirmation } : {}),
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user