diff options
author | FChannel <> | 2022-05-22 16:09:43 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 4b001f3f748cfb3a41672120c102c133dfef01ce (patch) | |
tree | 4346efc2060c2edce0b530c572426f3884fa8699 /route/routes/actor.go | |
parent | a66b676481d273508927e64a22e388dc302890ba (diff) |
delete posts working
Diffstat (limited to 'route/routes/actor.go')
-rw-r--r-- | route/routes/actor.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/route/routes/actor.go b/route/routes/actor.go index e27133b..e1372ee 100644 --- a/route/routes/actor.go +++ b/route/routes/actor.go @@ -21,6 +21,7 @@ import ( func ActorInbox(ctx *fiber.Ctx) error { activity, err := activitypub.GetActivityFromJson(ctx) + if err != nil { return util.MakeError(err, "ActorInbox") } @@ -380,8 +381,8 @@ func ActorPost(ctx *fiber.Ctx) error { } func ActorPostGet(ctx *fiber.Ctx) error { - actor, err := activitypub.GetActorByNameFromDB(ctx.Params("actor")) + if err != nil { return nil } @@ -428,8 +429,9 @@ func ActorPostGet(ctx *fiber.Ctx) error { } else { obj := activitypub.ObjectBase{Id: inReplyTo} collection, err := obj.GetCollectionFromPath() + if err != nil { - return util.MakeError(err, "PostGet") + return ctx.Status(404).Render("404", fiber.Map{}) } if collection.Actor.Id != "" { @@ -560,7 +562,7 @@ func ActorOutboxGet(ctx *fiber.Ctx) error { actor, err := activitypub.GetActorByNameFromDB(ctx.Params("actor")) if err != nil { - return nil + return ctx.Status(404).Render("404", fiber.Map{}) } if activitypub.AcceptActivity(ctx.Get("Accept")) { |