forgejo/routers/api/v1/activitypub/repository.go

53 lines
1.3 KiB
Go
Raw Normal View History

2023-10-23 17:16:38 +02:00
// Copyright 2023 The Gitea forgejoAuthors. All rights reserved.
2023-10-20 15:16:04 +02:00
// SPDX-License-Identifier: MIT
package activitypub
import (
"net/http"
"code.gitea.io/gitea/modules/context"
2023-10-27 12:12:31 +02:00
"code.gitea.io/gitea/modules/log"
2023-10-20 15:16:04 +02:00
)
// Repository function returns the Repository actor for a repo
func Repository(ctx *context.APIContext) {
// swagger:operation GET /activitypub/repository-id/{repository-id} activitypub activitypubRepository
// ---
// summary: Returns the Repository actor for a repo
// produces:
// - application/json
// parameters:
// - name: repository-id
// in: path
// description: repository ID of the repo
// type: integer
// required: true
// responses:
// "200":
// "$ref": "#/responses/ActivityPub"
2023-10-27 12:12:31 +02:00
log.Error("Repository")
2023-10-20 15:16:04 +02:00
ctx.Status(http.StatusNoContent)
}
// PersonInbox function handles the incoming data for a repository inbox
func RepositoryInbox(ctx *context.APIContext) {
// swagger:operation POST /activitypub/repository-id/{repository-id}/inbox activitypub activitypubRepository
// ---
// summary: Send to the inbox
// produces:
// - application/json
// parameters:
// - name: repository-id
// in: path
// description: repository ID of the repo
// type: integer
// required: true
// responses:
// "204":
// "$ref": "#/responses/empty"
ctx.Status(http.StatusNoContent)
}