🎉 first commit

This commit is contained in:
LIlGG
2025-09-24 13:06:25 +08:00
commit 1f4fb103e9
409 changed files with 61222 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import type { LoaderFunctionArgs } from '@remix-run/node';
import { data } from '@remix-run/node';
import { getAuthError } from '~/lib/.server/auth';
/**
* 检查认证错误信息的路由
*
* 从会话中读取认证错误信息,并在响应中返回
* 同时会清除错误信息,确保它只显示一次
*/
export async function checkErrorLoader({ request }: LoaderFunctionArgs) {
const { errorMessage, headers } = await getAuthError(request);
return data(
{
errorMessage,
},
{
headers,
},
);
}