|
|
|
@ -925,18 +925,17 @@
|
|
|
|
|
:archive-entries ,(nera:get-all-archive-entries)))))) |
|
|
|
|
|
|
|
|
|
(defroute ("/view/archive/:slug" :method :GET) (&key slug) |
|
|
|
|
(format nil "Page not implemented")) |
|
|
|
|
;; (let ((alert (utils:get-and-reset-alert))) |
|
|
|
|
;; (if (storage:file-exists-p "" "pages" slug) |
|
|
|
|
;; (render #P"archive.html" |
|
|
|
|
;; (append (if (hermetic:logged-in-p) |
|
|
|
|
;; (auth:auth-user-data)) |
|
|
|
|
;; `(:alert ,alert |
|
|
|
|
;; :db-data ,(nera:get-page slug) |
|
|
|
|
;; :system-data ,(nera:system-data) |
|
|
|
|
;; :data ,(storage:open-text-file |
|
|
|
|
;; "" "pages" slug)))) |
|
|
|
|
;; (on-exception *web* 404)))) |
|
|
|
|
(let ((alert (utils:get-and-reset-alert))) |
|
|
|
|
(if (storage:file-exists-p "" "archive" slug) |
|
|
|
|
(render #P"archive-entry.html" |
|
|
|
|
(append (if (hermetic:logged-in-p) |
|
|
|
|
(auth:auth-user-data)) |
|
|
|
|
`(:alert ,alert |
|
|
|
|
:db-data ,(nera:get-archive-entry :slug slug) |
|
|
|
|
:system-data ,(nera:system-data) |
|
|
|
|
:data ,(storage:open-text-file |
|
|
|
|
"" "archive" slug)))) |
|
|
|
|
(on-exception *web* 404)))) |
|
|
|
|
|
|
|
|
|
(defroute ("/user/archive" :method :GET) () |
|
|
|
|
(hermetic:auth (:logged-in) |
|
|
|
|