From 727d7759e0a733c4575de5431160fbd090371728 Mon Sep 17 00:00:00 2001 From: Masaya Tojo Date: Thu, 28 Mar 2024 02:48:32 +0900 Subject: Add source column to articles table. --- readers/article.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'readers') diff --git a/readers/article.rkt b/readers/article.rkt index c60de16..2d14639 100644 --- a/readers/article.rkt +++ b/readers/article.rkt @@ -27,6 +27,9 @@ (define hash (hash-ref jse 'hash (thunk (k "hash not found")))) (unless (string? hash) (k "hash must be a string")) + (define source (hash-ref jse 'source (thunk (k "source not found")))) + (unless (string? source) (k "source must be a string")) + (define title (hash-ref jse 'title (thunk (k "title not found")))) (unless (string? title) (k "title must be a string")) @@ -37,7 +40,7 @@ (define body (hash-ref jse 'html (thunk (k "html not found")))) (unless (string? body) (k "html must be a string")) - (make-article-with-tags id timestamp hash title body tags)))) + (make-article-with-tags id timestamp hash source title body tags)))) (: read-article (-> Input-Port (U Article-With-Tags EOF))) (define (read-article in) -- cgit v1.2.3