1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-24 08:57:03 -05:00

wip: lets define the post input more close

This commit is contained in:
Michael Jerger 2023-11-06 08:50:36 +01:00
parent 6587b6d62b
commit 7195141805
2 changed files with 53 additions and 0 deletions

View file

@ -897,6 +897,7 @@ func Routes() *web.Route {
m.Group("/repository-id/{repository-id}", func() {
m.Get("", activitypub.Repository)
m.Post("/inbox",
bind(api.CreateRepoOption{}),
//activitypub.ReqHTTPSignature(),
activitypub.RepositoryInbox)
}, context_service.RepositoryIDAssignmentAPI())

View file

@ -23,6 +23,58 @@
},
"basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1",
"paths": {
"/activitypub/repository-id/{repository-id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"activitypub"
],
"summary": "Returns the Repository actor for a repo",
"operationId": "activitypubRepository",
"parameters": [
{
"type": "integer",
"description": "repository ID of the repo",
"name": "repository-id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/ActivityPub"
}
}
}
},
"/activitypub/repository-id/{repository-id}/inbox": {
"post": {
"produces": [
"application/json"
],
"tags": [
"activitypub"
],
"summary": "Send to the inbox",
"operationId": "activitypubRepository",
"parameters": [
{
"type": "integer",
"description": "repository ID of the repo",
"name": "repository-id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
}
}
}
},
"/activitypub/user-id/{user-id}": {
"get": {
"produces": [