From 546ce5033720ab2c9cf1a9bd70f5cb0e678ee548 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 24 Nov 2023 11:40:12 +0100 Subject: [PATCH] Use PanicIfInvalid in repository.go --- routers/api/v1/activitypub/repository.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routers/api/v1/activitypub/repository.go b/routers/api/v1/activitypub/repository.go index 8b2b364b8b..1cfe2830c9 100644 --- a/routers/api/v1/activitypub/repository.go +++ b/routers/api/v1/activitypub/repository.go @@ -95,11 +95,7 @@ func RepositoryInbox(ctx *context.APIContext) { } // Is the ActorData Struct valid? - err = actor.Validate() - - if err != nil { - panic(err) - } + actor.PanicIfInvalid() log.Info("RepositoryInbox: Actor parsed. %v", actor)