1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-01 17:38:33 +00:00
This commit is contained in:
Michael Jerger 2024-03-22 07:52:03 +01:00
parent 7316108d56
commit 9ccad50b05
4 changed files with 7 additions and 0 deletions

View file

@ -19,6 +19,7 @@ type ForgeLike struct {
ap.Activity
}
// TODO: Use explicit values instead of ctx !!
func NewForgeLike(ctx *context.APIContext) (ForgeLike, error) {
result := ForgeLike{}
actorIRI := ctx.Repo.Owner.APAPIURL()

View file

@ -347,6 +347,8 @@ func (repo *Repository) APIURL() string {
}
// APAPIURL returns the activitypub repository API URL
// TODO: At least camel case?
// TODO: Mv federation related stuff to federated_repo
func (repo *Repository) APAPIURL() string {
return setting.AppURL + "api/v1/activitypub/repository-id/" + url.PathEscape(string(repo.ID))
}