start work on AP inbox post

This commit is contained in:
tsmethurst 2021-05-10 18:53:05 +02:00
commit d09a8a1f05
12 changed files with 207 additions and 22 deletions

View file

@ -38,6 +38,7 @@ const (
// Use this anywhere you need to know the username of the user being queried.
// Eg https://example.org/users/:username
UsersBasePathWithUsername = UsersBasePath + "/:" + UsernameKey
UsersInboxPath = UsersBasePathWithUsername + "/" + util.InboxPath
)
// ActivityPubAcceptHeaders represents the Accept headers mentioned here:
@ -66,5 +67,6 @@ func New(config *config.Config, processor message.Processor, log *logrus.Logger)
// Route satisfies the RESTAPIModule interface
func (m *Module) Route(s router.Router) error {
s.AttachHandler(http.MethodGet, UsersBasePathWithUsername, m.UsersGETHandler)
s.AttachHandler(http.MethodPost, UsersInboxPath, m.InboxPOSTHandler)
return nil
}