aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/activitypub/person.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/activitypub/person.go')
-rw-r--r--routers/api/v1/activitypub/person.go56
1 files changed, 50 insertions, 6 deletions
diff --git a/routers/api/v1/activitypub/person.go b/routers/api/v1/activitypub/person.go
index 019610291..8d3119590 100644
--- a/routers/api/v1/activitypub/person.go
+++ b/routers/api/v1/activitypub/person.go
@@ -94,8 +94,30 @@ func Person(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, jsonmap)
}
-// PersonInbox function
-func PersonInbox(ctx *context.APIContext) {
+// PersonInboxGet function
+func PersonInboxGet(ctx *context.APIContext) {
+ // swagger:operation GET /activitypub/user/{username}/outbox activitypub activitypubPersonInbox
+ // ---
+ // summary: Returns the inbox
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: username
+ // in: path
+ // description: username of the user
+ // type: string
+ // required: true
+ // responses:
+ // responses:
+ // "200":
+ // "$ref": "#/responses/ActivityPub"
+
+ ctx.Status(http.StatusOK)
+ activitypub.GetUserActor().GetInbox(ctx, ctx.Resp, ctx.Req)
+}
+
+// PersonInboxPost function
+func PersonInboxPost(ctx *context.APIContext) {
// swagger:operation POST /activitypub/user/{username}/inbox activitypub activitypubPersonInbox
// ---
// summary: Send to the inbox
@@ -113,11 +135,11 @@ func PersonInbox(ctx *context.APIContext) {
// "$ref": "#/responses/ActivityPub"
ctx.Status(http.StatusOK)
- activitypub.GetUserActor().PostOutbox(ctx, ctx.Resp, ctx.Req)
+ activitypub.GetUserActor().PostInbox(ctx, ctx.Resp, ctx.Req)
}
-// PersonOutbox function
-func PersonOutbox(ctx *context.APIContext) {
+// PersonOutboxGet function
+func PersonOutboxGet(ctx *context.APIContext) {
// swagger:operation GET /activitypub/user/{username}/outbox activitypub activitypubPersonOutbox
// ---
// summary: Returns the outbox
@@ -134,6 +156,28 @@ func PersonOutbox(ctx *context.APIContext) {
// "200":
// "$ref": "#/responses/ActivityPub"
- ctx.Status(http.StatusNoContent)
+ ctx.Status(http.StatusOK)
activitypub.GetUserActor().GetOutbox(ctx, ctx.Resp, ctx.Req)
+}
+
+// PersonOutboxPost function
+func PersonOutboxPost(ctx *context.APIContext) {
+ // swagger:operation POST /activitypub/user/{username}/outbox activitypub activitypubPersonOutbox
+ // ---
+ // summary: Send to the outbox
+ // produces:
+ // - application/json
+ // parameters:
+ // - name: username
+ // in: path
+ // description: username of the user
+ // type: string
+ // required: true
+ // responses:
+ // responses:
+ // "200":
+ // "$ref": "#/responses/ActivityPub"
+
+ ctx.Status(http.StatusOK)
+ activitypub.GetUserActor().PostOutbox(ctx, ctx.Resp, ctx.Req)
} \ No newline at end of file