fix(federation): 🚑 Fix broken inbound federation and add end-to-end testing for federation

This commit is contained in:
Jesse Wierzbinski 2025-04-19 13:16:53 +02:00
parent 85ef96fc7f
commit 8ae4f3815a
No known key found for this signature in database
9 changed files with 192 additions and 29 deletions

View file

@ -4,7 +4,6 @@ import { z } from "zod";
import { apiRoute, handleZodError } from "@/api";
import { ApiError } from "~/classes/errors/api-error";
import { InboxJobType, inboxQueue } from "~/classes/queues/inbox";
import type { JSONObject } from "~/packages/sdk/types";
export default apiRoute((app) =>
app.post(
@ -87,9 +86,8 @@ export default apiRoute((app) =>
}),
handleZodError,
),
validator("json", z.any(), handleZodError),
async (context) => {
const body: JSONObject = await context.req.valid("json");
const body = await context.req.json();
const {
"versia-signature": signature,
"versia-signed-at": signedAt,