mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05: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 {
|
||||
case "forgejo", "gitea":
|
||||
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())
|
||||
if !strings.Contains(a.path, "api/v1/activitypub/user-id") &&
|
||||
!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:
|
||||
err = append(err, fmt.Errorf("currently only forgeo and gitea sources are allowed from actor id").Error())
|
||||
|
|
Loading…
Reference in a new issue