mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-29 01:04:52 +09:00
Add route /publish for sending activities, getOutboxR now free to return outbox
This commit is contained in:
parent
d40e1b8891
commit
c27636a438
4 changed files with 11 additions and 4 deletions
|
@ -24,6 +24,7 @@
|
||||||
-- Federation
|
-- Federation
|
||||||
-- ----------------------------------------------------------------------------
|
-- ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
/publish PublishR GET
|
||||||
/inbox InboxR GET POST
|
/inbox InboxR GET POST
|
||||||
/outbox OutboxR GET POST
|
/outbox OutboxR GET POST
|
||||||
/akey1 ActorKey1R GET
|
/akey1 ActorKey1R GET
|
||||||
|
|
|
@ -765,6 +765,7 @@ instance YesodBreadcrumbs App where
|
||||||
FaviconR -> ("", Nothing)
|
FaviconR -> ("", Nothing)
|
||||||
RobotsR -> ("", Nothing)
|
RobotsR -> ("", Nothing)
|
||||||
|
|
||||||
|
PublishR -> ("Publish", Just HomeR)
|
||||||
InboxR -> ("Inbox", Nothing)
|
InboxR -> ("Inbox", Nothing)
|
||||||
OutboxR -> ("Outbox", Nothing)
|
OutboxR -> ("Outbox", Nothing)
|
||||||
ActorKey1R -> ("Actor Key 1", Nothing)
|
ActorKey1R -> ("Actor Key 1", Nothing)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
module Vervis.Handler.Inbox
|
module Vervis.Handler.Inbox
|
||||||
( getInboxR
|
( getInboxR
|
||||||
, postInboxR
|
, postInboxR
|
||||||
|
, getPublishR
|
||||||
, getOutboxR
|
, getOutboxR
|
||||||
, postOutboxR
|
, postOutboxR
|
||||||
, getActorKey1R
|
, getActorKey1R
|
||||||
|
@ -219,11 +220,14 @@ activityWidget widget enctype =
|
||||||
<input type=submit>
|
<input type=submit>
|
||||||
|]
|
|]
|
||||||
|
|
||||||
getOutboxR :: Handler Html
|
getPublishR :: Handler Html
|
||||||
getOutboxR = do
|
getPublishR = do
|
||||||
((_result, widget), enctype) <- runFormPost activityForm
|
((_result, widget), enctype) <- runFormPost activityForm
|
||||||
defaultLayout $ activityWidget widget enctype
|
defaultLayout $ activityWidget widget enctype
|
||||||
|
|
||||||
|
getOutboxR :: Handler TypedContent
|
||||||
|
getOutboxR = error "Not implemented yet"
|
||||||
|
|
||||||
route2uri' :: (Route App -> Text) -> Route App -> FedURI
|
route2uri' :: (Route App -> Text) -> Route App -> FedURI
|
||||||
route2uri' renderUrl r =
|
route2uri' renderUrl r =
|
||||||
case parseFedURI $ renderUrl r of
|
case parseFedURI $ renderUrl r of
|
||||||
|
|
|
@ -30,8 +30,9 @@ $nothing
|
||||||
<a href=@{AuthR newAccountR}>Sign up.
|
<a href=@{AuthR newAccountR}>Sign up.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
UPDATE: Federation is coming!
|
UPDATE: Federation is coming! You can <a href=@{PublishR}>publish</a>
|
||||||
<a href=@{OutboxR}>Very early testing
|
activities, and see results in the destination server's
|
||||||
|
<a href=@{InboxR}>inbox</a> report page!
|
||||||
|
|
||||||
<.instance>
|
<.instance>
|
||||||
Vervis @ #{instanceHost}
|
Vervis @ #{instanceHost}
|
||||||
|
|
Loading…
Reference in a new issue