identity: /people view (Persons, email-keyed) for id.rose-ash.com
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -3236,6 +3236,21 @@
|
||||
(host/blog-relate! pid "person" "is-a")
|
||||
(host/blog--set-field-values! pid {"email" email})))
|
||||
(dream-response 200 {:content-type "text/plain; charset=utf-8"} (str "person:" pid)))))))
|
||||
;; ── /people — the identity domain view: Persons, email-keyed, login-optional ──
|
||||
(define host/blog-people
|
||||
(fn (req)
|
||||
(host/blog--resp req 200
|
||||
(host/blog--page req "People"
|
||||
(quasiquote
|
||||
(div (h1 "👤 People")
|
||||
(p "Accounts keyed by contact-id (email) — created at checkout, login optional.")
|
||||
(unquote
|
||||
(let ((people (host/blog-in "person" "is-a")))
|
||||
(if (= (len people) 0) (quote (p :style "color:#999" (em "No people yet.")))
|
||||
(cons (quote ul)
|
||||
(map (fn (p) (let ((email (get (host/blog-field-values-of p) "email")))
|
||||
(quasiquote (li (b (unquote (str p))) (unquote (str " — " (or email "")))))))
|
||||
people)))))))))))
|
||||
;; ── /orders — the shop domain view: ticket orders placed for events (federated from events) ──
|
||||
(define host/blog-orders
|
||||
(fn (req)
|
||||
@@ -3334,6 +3349,7 @@
|
||||
(dream-get "/calendars" host/blog-calendars)
|
||||
(dream-get "/cinema" host/blog-cinema)
|
||||
(dream-get "/orders" host/blog-orders)
|
||||
(dream-get "/people" host/blog-people)
|
||||
(dream-post "/new-film" host/blog-new-film)
|
||||
(dream-post "/new-showing" host/blog-new-showing)
|
||||
(dream-post "/buy-ticket" host/blog-buy-ticket)
|
||||
|
||||
Reference in New Issue
Block a user