mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-11 18:08:27 +00:00
* Feat: add onboarding screens * Fix: integration account handling and improve webhook event processing * Bump version: 0.1.12 --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
23 lines
604 B
TypeScript
23 lines
604 B
TypeScript
import { json } from "@remix-run/node";
|
|
|
|
import { createHybridActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
|
|
import { addToQueue } from "~/lib/ingest.server";
|
|
import { IngestBodyRequest } from "~/trigger/ingest/ingest";
|
|
|
|
const { action, loader } = createHybridActionApiRoute(
|
|
{
|
|
body: IngestBodyRequest,
|
|
allowJWT: true,
|
|
authorization: {
|
|
action: "ingest",
|
|
},
|
|
corsStrategy: "all",
|
|
},
|
|
async ({ body, authentication }) => {
|
|
const response = addToQueue(body, authentication.userId);
|
|
return json({ ...response });
|
|
},
|
|
);
|
|
|
|
export { action, loader };
|