summaryrefslogtreecommitdiff
path: root/internal/api/s2s/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/s2s/user/user.go')
-rw-r--r--internal/api/s2s/user/user.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/api/s2s/user/user.go b/internal/api/s2s/user/user.go
index a6116247d..d866e47e1 100644
--- a/internal/api/s2s/user/user.go
+++ b/internal/api/s2s/user/user.go
@@ -32,6 +32,8 @@ import (
const (
// UsernameKey is for account usernames.
UsernameKey = "username"
+ // StatusIDKey is for status IDs
+ StatusIDKey = "status"
// UsersBasePath is the base path for serving information about Users eg https://example.org/users
UsersBasePath = "/" + util.UsersPath
// UsersBasePathWithUsername is just the users base path with the Username key in it.
@@ -40,6 +42,10 @@ const (
UsersBasePathWithUsername = UsersBasePath + "/:" + UsernameKey
// UsersInboxPath is for serving POST requests to a user's inbox with the given username key.
UsersInboxPath = UsersBasePathWithUsername + "/" + util.InboxPath
+ // UsersFollowersPath is for serving GET request's to a user's followers list, with the given username key.
+ UsersFollowersPath = UsersBasePathWithUsername + "/" + util.FollowersPath
+ // UsersStatusPath is for serving GET requests to a particular status by a user, with the given username key and status ID
+ UsersStatusPath = UsersBasePathWithUsername + "/" + util.StatusesPath + "/:" + StatusIDKey
)
// ActivityPubAcceptHeaders represents the Accept headers mentioned here:
@@ -69,5 +75,7 @@ func New(config *config.Config, processor message.Processor, log *logrus.Logger)
func (m *Module) Route(s router.Router) error {
s.AttachHandler(http.MethodGet, UsersBasePathWithUsername, m.UsersGETHandler)
s.AttachHandler(http.MethodPost, UsersInboxPath, m.InboxPOSTHandler)
+ s.AttachHandler(http.MethodGet, UsersFollowersPath, m.FollowersGETHandler)
+ s.AttachHandler(http.MethodGet, UsersStatusPath, m.StatusGETHandler)
return nil
}