Add source editing to ingest
All checks were successful
CI / build-and-deploy (push) Successful in 25s

This commit is contained in:
Krishna Kumar
2026-07-02 16:35:02 -05:00
parent f7735431a8
commit 8e1d94a4ea
4 changed files with 119 additions and 1 deletions

View File

@@ -43,6 +43,15 @@ final class IngestedSourceLibrary {
}
}
func update(_ source: IngestedSource, title: String, bodyText: String, tags: [String]) {
var updated = source
updated.title = title.trimmingCharacters(in: .whitespacesAndNewlines)
updated.bodyText = bodyText.trimmingCharacters(in: .whitespacesAndNewlines)
updated.tags = tags
updated.modifiedAt = Date()
upsert(updated)
}
func delete(_ source: IngestedSource) {
do {
try store.delete(source)