mirror of
https://github.com/trafficlunar/tomodachi-share.git
synced 2026-03-28 11:13:16 +00:00
fix: uncomment code
MONKA
This commit is contained in:
parent
a6c2d924f1
commit
48999695c9
1 changed files with 16 additions and 16 deletions
|
|
@ -19,26 +19,26 @@ export const metadata: Metadata = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function SubmitPage() {
|
export default async function SubmitPage() {
|
||||||
// const session = await auth();
|
const session = await auth();
|
||||||
|
|
||||||
// if (!session) redirect("/login");
|
if (!session) redirect("/login");
|
||||||
// if (!session.user.username) redirect("/create-username");
|
if (!session.user.username) redirect("/create-username");
|
||||||
// const activePunishment = await prisma.punishment.findFirst({
|
const activePunishment = await prisma.punishment.findFirst({
|
||||||
// where: {
|
where: {
|
||||||
// userId: Number(session?.user.id),
|
userId: Number(session?.user.id),
|
||||||
// returned: false,
|
returned: false,
|
||||||
// },
|
},
|
||||||
// });
|
});
|
||||||
// if (activePunishment) redirect("/off-the-island");
|
if (activePunishment) redirect("/off-the-island");
|
||||||
|
|
||||||
// Check if submissions are disabled
|
// Check if submissions are disabled
|
||||||
let value: boolean | null = true;
|
let value: boolean | null = true;
|
||||||
// try {
|
try {
|
||||||
// const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`);
|
const response = await fetch(`${process.env.NEXT_PUBLIC_BASE_URL}/api/admin/can-submit`);
|
||||||
// value = await response.json();
|
value = await response.json();
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// return <p>An error occurred!</p>;
|
return <p>An error occurred!</p>;
|
||||||
// }
|
}
|
||||||
|
|
||||||
if (!value)
|
if (!value)
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue