bolt.new/packages/bolt/app/routes/chat.$id.tsx
2024-08-22 10:11:38 +02:00

10 lines
369 B
TypeScript

import { json, type LoaderFunctionArgs } from '@remix-run/cloudflare';
import { default as IndexRoute } from './_index';
import { loadWithAuth } from '~/lib/.server/auth';
export async function loader(args: LoaderFunctionArgs) {
return loadWithAuth(args, async (_args, session) => json({ id: args.params.id, avatar: session.avatar }));
}
export default IndexRoute;