mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-10 08:58:31 +00:00
* Feat: v2 * feat: add chat functionality * First cut: integrations * Feat: add conversation API * Enhance conversation handling and memory management * Feat: added conversation --------- Co-authored-by: Manoj K <saimanoj58@gmail.com>
22 lines
672 B
TypeScript
22 lines
672 B
TypeScript
import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
|
|
import { callbackHandler } from "~/services/oauth/oauth.server";
|
|
import type { CallbackParams } from "~/services/oauth/oauth-utils.server";
|
|
|
|
// This route handles the OAuth callback, similar to the NestJS controller
|
|
const { loader } = createActionApiRoute(
|
|
{
|
|
allowJWT: false,
|
|
corsStrategy: "all",
|
|
},
|
|
async ({ request }) => {
|
|
const url = new URL(request.url);
|
|
const params: CallbackParams = {};
|
|
for (const [key, value] of url.searchParams.entries()) {
|
|
params[key] = value;
|
|
}
|
|
return await callbackHandler(params, request);
|
|
},
|
|
);
|
|
|
|
export { loader };
|