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