link-server-hook: refactor scries
^- [@ud @ud (list [submission comments=@ud])]
=- (get-paginated - p)
%+ turn
- .^ submissions
- %gx
- (scot %p our.bowl)
- %link-store
- (scot %da now.bowl)
- %submissions
- (snoc path %noun)
- ==
+ %+ scry-for submissions
+ [%submissions path]
|= =submission
:- submission
- ::TODO ++ scry-for |* [=mold =path]
%- lent
- .^ comments
- %gx
- (scot %p our.bowl)
- %link-store
- (scot %da now.bowl)
- %discussions
- ::
- %+ weld path
- ~[(crip (en-base64:mimes:html url.submission)) %noun]
- ==
+ %+ scry-for comments
+ :- %discussions
+ %+ snoc path
+ %- crip
+ (en-base64:mimes:html url.submission)
::
++ get-local-pages
|= [=path p=(unit @ud)]
^- [@ud @ud pages]
=- (get-paginated - p)
- .^ pages
- %gx
- (scot %p our.bowl)
- %link-store
- (scot %da now.bowl)
- %local-pages
- (snoc path %noun)
- ==
+ %+ scry-for pages
+ [%local-pages path]
::
++ get-discussions
|= [=path p=(unit @ud)]
^- [@ud @ud comments]
=- (get-paginated - p)
- .^ comments
- %gx
- (scot %p our.bowl)
- %link-store
- (scot %da now.bowl)
- %discussions
- (snoc path %noun)
- ==
+ %+ scry-for comments
+ [%discussions path]
::
++ get-file-at
|= [base=path file=path ext=@ta]
%- some
%- as-octs:mimes:html
.^(@ %cx path)
+::
+++ scry-for
+ |* [=mold =path]
+ .^ mold
+ %gx
+ (scot %p our.bowl)
+ %link-store
+ (scot %da now.bowl)
+ (snoc `^path`path %noun)
+ ==
--
\ No newline at end of file
