fix event admin
This commit is contained in:
@@ -4,6 +4,7 @@ export {
|
||||
apiGetAdminEventRiwayatCount as apiGetEventRiwayatCount,
|
||||
apiGetAdminEventByStatus as apiGetDataEventByStatus,
|
||||
apiGetAdminEventRiwayat,
|
||||
apiGetAdminEventTipeAcara,
|
||||
};
|
||||
|
||||
const apiGetAdminEventStatusCountDashboard = async ({
|
||||
@@ -114,3 +115,20 @@ const apiGetAdminEventRiwayat = async ({
|
||||
|
||||
return await response.json().catch(() => null);
|
||||
};
|
||||
|
||||
const apiGetAdminEventTipeAcara = async () => {
|
||||
const { token } = await fetch("/api/get-cookie").then((res) => res.json());
|
||||
if (!token) return await token.json().catch(() => null);
|
||||
|
||||
const response = await fetch(`/api/event/tipe-acara`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Accept: "application/json",
|
||||
"Access-Control-Allow-Origin": "*",
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
return await response.json().catch(() => null);
|
||||
};
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { AdminEvent_Riwayat } from "@/app_modules/admin/event";
|
||||
import { adminEvent_funGetListAllRiwayat } from "@/app_modules/admin/event/fun/get/get_list_all_riwayat";
|
||||
|
||||
export default async function Page() {
|
||||
// const listRiwayat = await adminEvent_funGetListAllRiwayat({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -2,11 +2,11 @@ import { AdminEvent_DetailTipeAcara } from "@/app_modules/admin/event";
|
||||
import { AdminEvent_getListTipeAcara } from "@/app_modules/admin/event/fun/get/get_list_tipe_acara";
|
||||
|
||||
export default async function Page() {
|
||||
const listTipe = await AdminEvent_getListTipeAcara()
|
||||
// const listTipe = await AdminEvent_getListTipeAcara()
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminEvent_DetailTipeAcara listTipe={listTipe}/>
|
||||
<AdminEvent_DetailTipeAcara />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user