mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-02 03:06:52 -05:00
14 lines
389 B
TypeScript
14 lines
389 B
TypeScript
import type { LoaderFunctionArgs } from "@remix-run/node";
|
|
import * as UserRepository from "~/features/user-page/UserRepository.server";
|
|
import { notFoundIfFalsy } from "~/utils/remix.server";
|
|
|
|
export const loader = async ({ params }: LoaderFunctionArgs) => {
|
|
const user = notFoundIfFalsy(
|
|
await UserRepository.findProfileByIdentifier(params.identifier!),
|
|
);
|
|
|
|
return {
|
|
user,
|
|
};
|
|
};
|