mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-21 06:13:48 +00:00
refactor(domain): split updateFeedRecord into renameFeed and editFeed
The inPlace boolean hid two distinct intentions. Replace it with two intention-revealing operations backed by Feed.rename (presentational, never touches expiry) and Feed.edit (full edit, recomputes expiry, rejects expired). Add FeedRepository.saveConfig so these config-only edits don't re-write (and risk clobbering) the email index. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import { purgeFeedKeysStep, collectUnsubscribeUrls } from "./helpers";
|
||||
import { FeedRepository } from "../../domain/feed-repository";
|
||||
import {
|
||||
createFeedRecord,
|
||||
updateFeedRecord,
|
||||
editFeed,
|
||||
deleteFeedRecord,
|
||||
deleteFeedFastDetailed,
|
||||
} from "../../lib/feed-service";
|
||||
@@ -329,7 +329,7 @@ feedsRouter.post("/:feedId/edit", async (c) => {
|
||||
blockedSenders,
|
||||
});
|
||||
|
||||
const result = await updateFeedRecord(env, feedId, {
|
||||
const result = await editFeed(env, feedId, {
|
||||
title: parsedData.title,
|
||||
description: parsedData.description,
|
||||
language: parsedData.language,
|
||||
|
||||
Reference in New Issue
Block a user