mirror of
https://github.com/stackblitz/bolt.new
synced 2024-11-27 22:42:21 +00:00
10 lines
369 B
TypeScript
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;
|