feat: add source invite roles

This commit is contained in:
2026-07-19 05:45:42 +08:00
parent 9e159910ca
commit 44cd7a48ee
8 changed files with 41 additions and 4 deletions
+3
View File
@@ -0,0 +1,3 @@
import { redirect } from "next/navigation";
import { getSession } from "@/lib/auth";
export default async function InvitePage({ params }: { params: Promise<{ token: string }> }) { const { token } = await params; const user = await getSession(); if (!user) redirect("/login"); return <section className="card"><h1>加入來源</h1><p>以目前登入帳號 @{user.username} 接受此一次性邀請。</p><form action="/api/invites/accept" method="post"><input type="hidden" name="token" value={token} /><button>接受邀請</button></form></section>; }