feat: tambah dependensi 'jose' versi 5.9.2 pada package.json
refactor: rapikan identasi dan buat field 'expires' opsional di model UserSession pada schema prisma chore: bersihkan import tidak terpakai di route login dan register API
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { LayoutVote_DetailKontribusi } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
@@ -10,7 +11,9 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { LayoutVote_MainDetail } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
@@ -11,6 +12,7 @@ export default async function Layout({
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -5,15 +5,19 @@ import { Vote_getHasilVoteById } from "@/app_modules/vote/fun/get/get_list_hasil
|
||||
import { Vote_getListKontributorById } from "@/app_modules/vote/fun/get/get_list_kontributor_by_id";
|
||||
import { voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get/fun_get_one_by_id";
|
||||
import { Vote_getOnePilihanVotingByUserId } from "@/app_modules/vote/fun/get/get_one_pilihan_voting_by_user_id";
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const voteId = params.id;
|
||||
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const dataVote = await voting_funGetOneVotingbyId(voteId);
|
||||
const hasilVoting = await Vote_getHasilVoteById(voteId as any);
|
||||
const isKontributor = await Vote_cekKontributorById(voteId);
|
||||
const pilihanKontributor = await Vote_getOnePilihanVotingByUserId(voteId);
|
||||
const listKontributor = await Vote_getListKontributorById(voteId);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { LayoutVote_DetailPublish } from "@/app_modules/vote";
|
||||
import { Voting_funGetOneVotingbyId } from "@/app_modules/vote/fun/get";
|
||||
@@ -12,16 +13,14 @@ export default async function Layout({
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const dataVoting = await Voting_funGetOneVotingbyId(votingId);
|
||||
const authorId = dataVoting?.authorId;
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutVote_DetailPublish
|
||||
votingId={votingId}
|
||||
userLoginId={userLoginId}
|
||||
>
|
||||
<LayoutVote_DetailPublish votingId={votingId} userLoginId={userLoginId}>
|
||||
{children}
|
||||
</LayoutVote_DetailPublish>
|
||||
</>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global";
|
||||
import { LayoutVote_DetailSemuaRiwayat } from "@/app_modules/vote";
|
||||
import React from "react";
|
||||
@@ -9,9 +10,9 @@ export default async function Layout({
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
|
||||
const votingId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user