bolt.new/app/routes/chat.$id.tsx

10 lines
369 B
TypeScript
Raw Normal View History

2024-08-22 08:11:38 +00:00
import { json, type LoaderFunctionArgs } from '@remix-run/cloudflare';
2024-07-25 13:03:38 +00:00
import { default as IndexRoute } from './_index';
2024-08-22 08:11:38 +00:00
import { loadWithAuth } from '~/lib/.server/auth';
2024-07-25 13:03:38 +00:00
export async function loader(args: LoaderFunctionArgs) {
2024-08-22 08:11:38 +00:00
return loadWithAuth(args, async (_args, session) => json({ id: args.params.id, avatar: session.avatar }));
2024-07-25 13:03:38 +00:00
}
export default IndexRoute;