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,13 +1,16 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { Event_Create } from "@/app_modules/event";
|
||||
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_funGetOneUserId();
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const listTipeAcara = await Event_getMasterTipeAcara();
|
||||
|
||||
return (
|
||||
<Event_Create listTipeAcara={listTipeAcara as any} authorId={userId} />
|
||||
<Event_Create listTipeAcara={listTipeAcara as any} authorId={userLoginId} />
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { Event_DetailMain } from "@/app_modules/event";
|
||||
import { Event_countTotalPesertaById } from "@/app_modules/event/fun/count/count_total_peserta_by_id";
|
||||
import { Event_CekUserJoinById } from "@/app_modules/event/fun/get/cek_user_join_by_id";
|
||||
@@ -7,11 +8,13 @@ import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id;
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const dataEvent = await Event_getOneById(eventId);
|
||||
const listPeserta = await Event_getListPesertaById(eventId);
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
const isJoin = await Event_CekUserJoinById(eventId, userLoginId);
|
||||
const totalPeserta = await Event_countTotalPesertaById(eventId)
|
||||
const totalPeserta = await Event_countTotalPesertaById(eventId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { CheckCookies_UiView } from "@/app_modules/check_cookies";
|
||||
import { Event_StatusPage } from "@/app_modules/event";
|
||||
import { event_getAllDraft } from "@/app_modules/event/fun/get/status/get_all_draft";
|
||||
import { event_getAllReject } from "@/app_modules/event/fun/get/status/get_all_reject";
|
||||
@@ -6,7 +7,9 @@ import { event_funGetAllStatusPublish } from "@/app_modules/event/fun/get/status
|
||||
import { user_funGetOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const authorId = await user_funGetOneUserId();
|
||||
const userLoginId = await user_funGetOneUserId();
|
||||
if (!userLoginId) return <CheckCookies_UiView />;
|
||||
|
||||
const listPublish = await event_funGetAllStatusPublish({ page: 1 });
|
||||
const listReview = await event_getAllReview({ page: 1 });
|
||||
const listDraft = await event_getAllDraft({ page: 1 });
|
||||
@@ -14,7 +17,7 @@ export default async function Page() {
|
||||
|
||||
return (
|
||||
<Event_StatusPage
|
||||
authorId={authorId}
|
||||
authorId={userLoginId}
|
||||
listPublish={listPublish}
|
||||
listReview={listReview}
|
||||
listDraft={listDraft}
|
||||
|
||||
Reference in New Issue
Block a user