没啥变化

This commit is contained in:
sijinhui 2024-08-10 22:16:11 +08:00
parent 39c96dce59
commit 1bc010fb37
3 changed files with 5 additions and 2 deletions

View File

@ -599,7 +599,7 @@ export function ModalSelector<T extends CheckGroupValueType>(props: {
onClose?: () => void; onClose?: () => void;
multiple?: boolean; multiple?: boolean;
}) { }) {
console.log("-----", props); // console.log("-----", props);
const getCheckCardAvatar = (value: string): React.ReactNode => { const getCheckCardAvatar = (value: string): React.ReactNode => {
if (value.startsWith("gpt")) { if (value.startsWith("gpt")) {

View File

@ -183,6 +183,10 @@ export const authOptions: NextAuthOptions = {
// console.log('---', user, 'account', account, 'email', email, 'exist', existingUser) // console.log('---', user, 'account', account, 'email', email, 'exist', existingUser)
// 顺便过滤掉不允许登录的用户 // 顺便过滤掉不允许登录的用户
return !!existingUser && existingUser.allowToLogin; return !!existingUser && existingUser.allowToLogin;
},
// 重定向
async redirect({ url, baseUrl }) {
return baseUrl;
} }
}, },
}; };

View File

@ -11,7 +11,6 @@ export default async function middleware(req: NextRequest) {
const path = `${url.pathname}${ const path = `${url.pathname}${
searchParams.length > 0 ? `?${searchParams}` : "" searchParams.length > 0 ? `?${searchParams}` : ""
}`; }`;
console.log('----', url)
// 直接将/app/下面路由重定向到顶层 // 直接将/app/下面路由重定向到顶层
if (path.startsWith('/app')) { if (path.startsWith('/app')) {
return NextResponse.redirect(new URL(path.replace('/app', ''), req.url), 301); return NextResponse.redirect(new URL(path.replace('/app', ''), req.url), 301);