apps: resolve style comments about ?- vs ?:

This commit is contained in:
Logan Allen 2021-04-16 16:54:30 -05:00
parent b97b68024e
commit 81dcab8aa0
3 changed files with 40 additions and 50 deletions

View File

@ -894,15 +894,13 @@
=/ =uid:post (snag index history)
=/ =node:graph (got-node:libgraph uid)
=. audience resource.uid
?- -.post.node
%| [~ state]
%&
:_ put-ses
^- (list card)
:~ (print:sh-out ['?' ' ' number])
(effect:sh-out ~(render-activate mr resource.uid p.post.node))
prompt:sh-out
==
?: ?=(%| -.post.node)
[~ state]
:_ put-ses
^- (list card)
:~ (print:sh-out ['?' ' ' number])
(effect:sh-out ~(render-activate mr resource.uid p.post.node))
prompt:sh-out
==
--
:: +chats: display list of joined chats

View File

@ -300,29 +300,25 @@
=/ parent-index=index:store
(scag (dec (lent index)) index)
?: (~(has by nodes) parent-index) %.y
?- -.post.node
%| %.n
::
%&
?. =(author.p.post.node src.bowl)
%.n
=/ =permissions:store
%^ add-mark resource vip
(node-to-indexed-post node)
=/ =permission-level:store
(get-permission permissions is-admin writers)
?- permission-level
%yes %.y
%no %.n
::
%self
=/ parent-node=node:store
(got-node:gra resource parent-index)
?- -.post.parent-node
%| %.n
%& =(author.p.post.parent-node src.bowl)
==
==
?: ?=(%| -.post.node)
%.n
?. =(author.p.post.node src.bowl)
%.n
=/ =permissions:store
%^ add-mark resource vip
(node-to-indexed-post node)
=/ =permission-level:store
(get-permission permissions is-admin writers)
?- permission-level
%yes %.y
%no %.n
::
%self
=/ parent-node=node:store
(got-node:gra resource parent-index)
?: ?=(%| -.post.parent-node)
%.n
=(author.p.post.parent-node src.bowl)
==
::
++ is-allowed-remove
@ -337,20 +333,16 @@
^- ?
=/ =node:store
(got-node:gra resource index)
?- -.post.node
%| %.n
::
%&
=/ =permissions:store
%^ remove-mark resource vip
(node-to-indexed-post node)
=/ =permission-level:store
(get-permission permissions is-admin writers)
?- permission-level
%yes %.y
%no %.n
%self =(author.p.post.node src.bowl)
==
?: ?=(%| -.post.node) %.n
=/ =permissions:store
%^ remove-mark resource vip
(node-to-indexed-post node)
=/ =permission-level:store
(get-permission permissions is-admin writers)
?- permission-level
%yes %.y
%no %.n
%self =(author.p.post.node src.bowl)
==
::
++ build-permissions

View File

@ -368,11 +368,11 @@
=/ =node:store
~| "cannot remove index that does not exist {<index>}"
(need (get:orm graph atom))
~| "cannot remove post that has already been removed"
?> ?=(%& -.post.node)
=* p p.post.node
%= node
%_ node
post
~| "cannot remove post that has already been removed"
?> ?=(%& -.post.node)
=* p p.post.node
^- maybe-post:store
:- %|
?~ hash.p