Changes
4 changed files (+85/-59)
-
-
@@ -270,7 +270,7 @@ liked := ap.OrderedCollectionNew(ap.IRI(link))liked.TotalItems = uint(count) for _, repo := range repos { repo := forgefed.RepositoryNew(ap.IRI(strings.TrimSuffix(setting.AppURL, "/") + "/api/v1/activitypub/user/" + repo.OwnerName + "/" + repo.Name)) repo := forgefed.RepositoryNew(ap.IRI(strings.TrimSuffix(setting.AppURL, "/") + "/api/v1/activitypub/repo/" + repo.OwnerName + "/" + repo.Name)) liked.OrderedItems.Append(repo) }
-
-
-
@@ -22,7 +22,7 @@ )// Repo function func Repo(ctx *context.APIContext) { // swagger:operation GET /activitypub/user/{username}/{reponame} activitypub activitypubRepo // swagger:operation GET /activitypub/repo/{username}/{reponame} activitypub activitypubRepo // --- // summary: Returns the repository // produces:
-
@@ -71,7 +71,7 @@ }// RepoInbox function func RepoInbox(ctx *context.APIContext) { // swagger:operation POST /activitypub/user/{username}/{reponame}/inbox activitypub activitypubRepoInbox // swagger:operation POST /activitypub/repo/{username}/{reponame}/inbox activitypub activitypubRepoInbox // --- // summary: Send to the inbox // produces:
-
@@ -109,7 +109,7 @@ }// RepoOutbox function func RepoOutbox(ctx *context.APIContext) { // swagger:operation GET /activitypub/user/{username}/outbox activitypub activitypubPersonOutbox // swagger:operation GET /activitypub/repo/{username}/outbox activitypub activitypubPersonOutbox // --- // summary: Returns the outbox // produces:
-
@@ -158,7 +158,7 @@ }// RepoFollowers function func RepoFollowers(ctx *context.APIContext) { // swagger:operation GET /activitypub/user/{username}/{reponame}/followers activitypub activitypubRepoFollowers // swagger:operation GET /activitypub/repo/{username}/{reponame}/followers activitypub activitypubRepoFollowers // --- // summary: Returns the followers collection // produces:
-
-
-
@@ -652,13 +652,13 @@ m.Get("/outbox", activitypub.PersonOutbox)m.Get("/following", activitypub.PersonFollowing) m.Get("/followers", activitypub.PersonFollowers) m.Get("/liked", activitypub.PersonLiked) m.Group("/{reponame}", func() { m.Get("", activitypub.Repo) m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepoInbox) m.Get("/outbox", activitypub.RepoOutbox) m.Get("/followers", activitypub.RepoFollowers) }, repoAssignment()) }, context_service.UserAssignmentAPI()) m.Group("/repo/{username}/{reponame}", func() { m.Get("", activitypub.Repo) m.Post("/inbox", activitypub.ReqHTTPSignature(), activitypub.RepoInbox) m.Get("/outbox", activitypub.RepoOutbox) m.Get("/followers", activitypub.RepoFollowers) }, repoAssignment()) }) } m.Get("/signing-key.gpg", misc.SigningKey)
-
-
-
@@ -23,7 +23,7 @@ "version": "{{AppVer | JSEscape | Safe}}"}, "basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1", "paths": { "/activitypub/user/{username}": { "/activitypub/repo/{username}/outbox": { "get": { "produces": [ "application/activity+json"
-
@@ -31,8 +31,8 @@ ],"tags": [ "activitypub" ], "summary": "Returns the Person actor for a user", "operationId": "activitypubPerson", "summary": "Returns the outbox", "operationId": "activitypubPersonOutbox", "parameters": [ { "type": "string",
-
@@ -40,6 +40,13 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -49,7 +56,7 @@ }} } }, "/activitypub/user/{username}/followers": { "/activitypub/repo/{username}/{reponame}": { "get": { "produces": [ "application/activity+json"
-
@@ -57,8 +64,8 @@ ],"tags": [ "activitypub" ], "summary": "Returns the Liked Collection", "operationId": "activitypubPersonLiked", "summary": "Returns the repository", "operationId": "activitypubRepo", "parameters": [ { "type": "string",
-
@@ -66,6 +73,13 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -75,7 +89,7 @@ }} } }, "/activitypub/user/{username}/following": { "/activitypub/repo/{username}/{reponame}/followers": { "get": { "produces": [ "application/activity+json"
-
@@ -83,13 +97,20 @@ ],"tags": [ "activitypub" ], "summary": "Returns the Following Collection", "operationId": "activitypubPersonFollowing", "summary": "Returns the followers collection", "operationId": "activitypubRepoFollowers", "parameters": [ { "type": "string", "description": "username of the user", "name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true }
-
@@ -101,7 +122,7 @@ }} } }, "/activitypub/user/{username}/inbox": { "/activitypub/repo/{username}/{reponame}/inbox": { "post": { "produces": [ "application/activity+json"
-
@@ -110,7 +131,7 @@ "tags": ["activitypub" ], "summary": "Send to the inbox", "operationId": "activitypubPersonInbox", "operationId": "activitypubRepoInbox", "parameters": [ { "type": "string",
-
@@ -118,6 +139,13 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -127,7 +155,7 @@ }} } }, "/activitypub/user/{username}/outbox": { "/activitypub/user/{username}": { "get": { "produces": [ "application/activity+json"
-
@@ -135,8 +163,8 @@ ],"tags": [ "activitypub" ], "summary": "Returns the outbox", "operationId": "activitypubPersonOutbox", "summary": "Returns the Person actor for a user", "operationId": "activitypubPerson", "parameters": [ { "type": "string",
-
@@ -144,13 +172,6 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -160,7 +181,7 @@ }} } }, "/activitypub/user/{username}/{reponame}": { "/activitypub/user/{username}/followers": { "get": { "produces": [ "application/activity+json"
-
@@ -168,8 +189,8 @@ ],"tags": [ "activitypub" ], "summary": "Returns the repository", "operationId": "activitypubRepo", "summary": "Returns the Liked Collection", "operationId": "activitypubPersonLiked", "parameters": [ { "type": "string",
-
@@ -177,13 +198,6 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -193,7 +207,7 @@ }} } }, "/activitypub/user/{username}/{reponame}/followers": { "/activitypub/user/{username}/following": { "get": { "produces": [ "application/activity+json"
-
@@ -201,8 +215,8 @@ ],"tags": [ "activitypub" ], "summary": "Returns the followers collection", "operationId": "activitypubRepoFollowers", "summary": "Returns the Following Collection", "operationId": "activitypubPersonFollowing", "parameters": [ { "type": "string",
-
@@ -210,13 +224,6 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, { "type": "string", "description": "name of the repository", "name": "reponame", "in": "path", "required": true } ], "responses": {
-
@@ -226,7 +233,7 @@ }} } }, "/activitypub/user/{username}/{reponame}/inbox": { "/activitypub/user/{username}/inbox": { "post": { "produces": [ "application/activity+json"
-
@@ -235,7 +242,7 @@ "tags": ["activitypub" ], "summary": "Send to the inbox", "operationId": "activitypubRepoInbox", "operationId": "activitypubPersonInbox", "parameters": [ { "type": "string",
-
@@ -243,18 +250,37 @@ "description": "username of the user","name": "username", "in": "path", "required": true }, } ], "responses": { "204": { "$ref": "#/responses/empty" } } } }, "/activitypub/user/{username}/outbox": { "get": { "produces": [ "application/activity+json" ], "tags": [ "activitypub" ], "summary": "Returns the Outbox OrderedCollection", "operationId": "activitypubPersonOutbox", "parameters": [ { "type": "string", "description": "name of the repository", "name": "reponame", "description": "username of the user", "name": "username", "in": "path", "required": true } ], "responses": { "204": { "$ref": "#/responses/empty" "200": { "$ref": "#/responses/ActivityPub" } } }
-