Files
ghostwriter/server/routes/webhooks/strava/index.post.ts
2025-04-07 12:59:20 +03:00

15 lines
350 B
TypeScript

import { get } from "radash";
export default defineEventHandler(async (event) => {
const body = await readBody(event);
const db = useDrizzle();
const aspectType = get(body, "aspect_type");
const objectType = get(body, "object_type");
await $fetch(`/webhooks/strava/${objectType}-${aspectType}`, {
method: "post",
body,
});
});