mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
Allow parsing of repository-id too
This commit is contained in:
parent
4f25e5057a
commit
c0f1681fa3
1 changed files with 3 additions and 2 deletions
|
@ -53,8 +53,9 @@ func (a ActorID) Validate() []string {
|
||||||
|
|
||||||
switch a.source {
|
switch a.source {
|
||||||
case "forgejo", "gitea":
|
case "forgejo", "gitea":
|
||||||
if !strings.Contains(a.path, "api/v1/activitypub/user-id") {
|
if !strings.Contains(a.path, "api/v1/activitypub/user-id") &&
|
||||||
err = append(err, fmt.Errorf("the Path to the API was invalid: %v", a.path).Error())
|
!strings.Contains(a.path, "api/v1/activitypub/repository-id") {
|
||||||
|
err = append(err, fmt.Errorf("the Path to the API was invalid: ---%v---", a.path).Error())
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
err = append(err, fmt.Errorf("currently only forgeo and gitea sources are allowed from actor id").Error())
|
err = append(err, fmt.Errorf("currently only forgeo and gitea sources are allowed from actor id").Error())
|
||||||
|
|
Loading…
Reference in a new issue