changed invite peek interface to /:path/:uid

This commit is contained in:
Logan Allen 2019-11-01 15:18:17 -07:00
parent d7eb005ae8
commit 43edde1d0b
4 changed files with 16 additions and 14 deletions

View File

@ -350,8 +350,7 @@
++ invite-scry
|= uid=serial
^- (unit invite)
=/ pax
(weld /=invite-store/(scot %da now.bol)/invite/(scot %uv uid) /chat/noun)
=/ pax /=invite-store/(scot %da now.bol)/invite/chat/(scot %uv uid)/noun
.^((unit invite) %gx pax)
::
++ permitted-scry

View File

@ -30,7 +30,7 @@
?> !(team:title our.bol ship.invite.act)
[(invite-hook-poke recipient.invite.act act)]~
?~ (invitatory-scry path.act) ~
?^ (invite-scry uid.act path.act) ~
?^ (invite-scry path.act uid.act) ~
[(invite-poke path.act act)]~
==
::
@ -52,10 +52,10 @@
.^((unit invitatory) %gx pax)
::
++ invite-scry
|= [uid=serial pax=path]
|= [pax=path uid=serial]
^- (unit invite)
=. pax
;:(weld /=invite-store/(scot %da now.bol)/invite/(scot %uv uid) pax /noun)
;:(weld /=invite-store/(scot %da now.bol)/invite pax /(scot %uv uid)/noun)
.^((unit invite) %gx pax)
--

View File

@ -3,7 +3,7 @@
+$ move [bone card]
::
+$ card
$% [%diff diff]
$% [%diff invite-diff]
[%quit ~]
==
::
@ -14,11 +14,6 @@
+$ state-zero
$: =invites
==
::
+$ diff
$% [%invite-initial invites]
[%invite-update invite-update]
==
--
::
|_ [bol=bowl:gall state]
@ -48,12 +43,15 @@
++ peek-x-invite
|= pax=path
^- (unit (unit [%noun (unit invite)]))
?~ pax
:: /:path/:uid
=/ pas (flop pax)
?~ pas
~
=/ invitatory=(unit invitatory) (~(get by invites) t.pax)
=/ uid=serial (slav %uv i.pas)
=. pax (scag (dec (lent pax)) `(list @ta)`pax)
=/ invitatory=(unit invitatory) (~(get by invites) pax)
?~ invitatory
~
=/ uid=serial (slav %uv i.pax)
=/ invite=(unit invite) (~(get by u.invitatory) uid)
[~ ~ %noun invite]
::

View File

@ -35,5 +35,10 @@
[%invitatory =invitatory] :: receive invitatory
[%accepted =path uid=serial =invite] :: an invite has been accepted
==
::
+$ invite-diff
$% [%invite-initial invites]
[%invite-update invite-update]
==
--