From 8ee45c6ef446aea707df93a7caa14cf353d5746a Mon Sep 17 00:00:00 2001 From: Sabda Yagra Date: Tue, 17 Mar 2026 16:41:38 +0700 Subject: [PATCH] fixing: change endpoint api --- .../(protected)/supervisor/setting/social-media/page.tsx | 2 +- .../tbnews/[polda_name]/image/detail/[slug]/page.tsx | 6 +++--- .../satker/[satker_name]/image/detail/[slug]/page.tsx | 6 +++--- .../satker/[satker_name]/video/detail/[slug]/page.tsx | 6 +++--- .../(public)/content-management/download/page.tsx | 2 +- app/[locale]/(public)/content-management/galery/page.tsx | 2 +- app/[locale]/(public)/content-management/rewrite/page.tsx | 2 +- app/[locale]/(public)/video/detail/[slug]/page.tsx | 2 +- app/[locale]/layout.tsx | 2 +- app/[locale]/sitemap.xml/route.ts | 2 +- components/form/broadcast/content-blast--detail-form.tsx | 2 +- components/form/broadcast/content-blast-form.tsx | 6 +++--- components/form/task-ta/task-ta-detail-form.tsx | 2 +- components/main/audio-detail.tsx | 6 +++--- components/main/document-detail.tsx | 6 +++--- components/main/image-detail.tsx | 6 +++--- components/main/video-detail.tsx | 6 +++--- lib/menus.ts | 8 ++++---- service/http-config/axios-base-prod-instance.ts | 2 +- service/http-config/axiosInstanceJson.ts | 2 +- 20 files changed, 39 insertions(+), 39 deletions(-) diff --git a/app/[locale]/(protected)/supervisor/setting/social-media/page.tsx b/app/[locale]/(protected)/supervisor/setting/social-media/page.tsx index 56aae0ac..af596043 100644 --- a/app/[locale]/(protected)/supervisor/setting/social-media/page.tsx +++ b/app/[locale]/(protected)/supervisor/setting/social-media/page.tsx @@ -33,7 +33,7 @@ const responseFacebook = (response: FacebookLoginResponse) => { const clientId = "515231445138-5ius52rjsqucc6petfpv1d42v1lj778o.apps.googleusercontent.com"; - const feedbackUrl = "https://mediahub.polri.go.id/admin/settings/socmed"; + const feedbackUrl = "https://new.netidhub.com/admin/settings/socmed"; async function sendFbToken(token: string) { const res = await saveFbToken(token); diff --git a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx index 001d4ed7..22d81ee6 100644 --- a/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/(polda)/tbnews/[polda_name]/image/detail/[slug]/page.tsx @@ -868,7 +868,7 @@ const DetailInfo = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -883,7 +883,7 @@ const DetailInfo = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -898,7 +898,7 @@ const DetailInfo = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/detail/[slug]/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/detail/[slug]/page.tsx index aff268ab..6cf3960f 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/image/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/image/detail/[slug]/page.tsx @@ -526,7 +526,7 @@ const DetailInfo = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -541,7 +541,7 @@ const DetailInfo = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -556,7 +556,7 @@ const DetailInfo = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/detail/[slug]/page.tsx b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/detail/[slug]/page.tsx index 11b63717..e837227f 100644 --- a/app/[locale]/(public)/(satker)/satker/[satker_name]/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/(satker)/satker/[satker_name]/video/detail/[slug]/page.tsx @@ -666,7 +666,7 @@ const DetailVideo = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -681,7 +681,7 @@ const DetailVideo = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -696,7 +696,7 @@ const DetailVideo = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/app/[locale]/(public)/content-management/download/page.tsx b/app/[locale]/(public)/content-management/download/page.tsx index 6f1c37c9..05ec6f14 100644 --- a/app/[locale]/(public)/content-management/download/page.tsx +++ b/app/[locale]/(public)/content-management/download/page.tsx @@ -284,7 +284,7 @@ const Galery = (props: any) => { const copyToClip = async (url: any) => { await navigator.clipboard.writeText( - `https://mediahub.polri.go.id/video/detail/${url}` + `https://new.netidhub.com/video/detail/${url}` ); setCopySuccess("Copied"); // toast.success("Link Berhasil Di Copy"); diff --git a/app/[locale]/(public)/content-management/galery/page.tsx b/app/[locale]/(public)/content-management/galery/page.tsx index f08b7863..49af367e 100644 --- a/app/[locale]/(public)/content-management/galery/page.tsx +++ b/app/[locale]/(public)/content-management/galery/page.tsx @@ -291,7 +291,7 @@ const Galery = (props: any) => { const copyToClip = async (url: any) => { await navigator.clipboard.writeText( - `https://mediahub.polri.go.id/video/detail/${url}` + `https://new.netidhub.com/video/detail/${url}` ); setCopySuccess("Copied"); // toast.success("Link Berhasil Di Copy"); diff --git a/app/[locale]/(public)/content-management/rewrite/page.tsx b/app/[locale]/(public)/content-management/rewrite/page.tsx index 3f2d6c48..c27a52f8 100644 --- a/app/[locale]/(public)/content-management/rewrite/page.tsx +++ b/app/[locale]/(public)/content-management/rewrite/page.tsx @@ -134,7 +134,7 @@ const page = () => { const copyToClip = async (url: any) => { await navigator.clipboard.writeText( - `https://mediahub.polri.go.id/image/detail/${url}` + `https://new.netidhub.com/image/detail/${url}` ); setCopySuccess("Copied"); // toast.success("Link Berhasil Di Copy"); diff --git a/app/[locale]/(public)/video/detail/[slug]/page.tsx b/app/[locale]/(public)/video/detail/[slug]/page.tsx index 787308e3..c7ee9052 100644 --- a/app/[locale]/(public)/video/detail/[slug]/page.tsx +++ b/app/[locale]/(public)/video/detail/[slug]/page.tsx @@ -43,7 +43,7 @@ export async function generateMetadata({ params }: any): Promise { openGraph: { title: video?.title, description: video?.description, - url: `https://mediahub.polri.go.id/in/video/detail/${slug}`, + url: `https://new.netidhub.com/in/video/detail/${slug}`, type: "video.other", images: [ { diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index 3204db83..28e5e23e 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -23,7 +23,7 @@ import AuthProvider from "@/providers/auth.provider"; export const metadata: Metadata = { title: "Media Hub | POLRI", description: "Media Hub Platform for POLRI", - metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'https://mediahub.polri.go.id'), + metadataBase: new URL(process.env.NEXT_PUBLIC_SITE_URL || 'https://new.netidhub.com'), openGraph: { title: "Media Hub | POLRI", description: "Media Hub Platform for POLRI", diff --git a/app/[locale]/sitemap.xml/route.ts b/app/[locale]/sitemap.xml/route.ts index 27a798b0..5b893261 100644 --- a/app/[locale]/sitemap.xml/route.ts +++ b/app/[locale]/sitemap.xml/route.ts @@ -4,7 +4,7 @@ import { NextResponse } from "next/server"; export async function GET() { try { - const baseUrl = "https://mediahub.polri.go.id/in"; + const baseUrl = "https://new.netidhub.com/in"; const response = await getListContent({ page: 1, diff --git a/components/form/broadcast/content-blast--detail-form.tsx b/components/form/broadcast/content-blast--detail-form.tsx index 47a51bc4..7ce00c60 100644 --- a/components/form/broadcast/content-blast--detail-form.tsx +++ b/components/form/broadcast/content-blast--detail-form.tsx @@ -35,7 +35,7 @@ export default function DetailContentBlast() { const detailData = res?.data?.data; let updatedUrl = detailData.contentUrl; - const domainsToUpdate = ["mediahub.polri.go.id", "netidhub.com"]; + const domainsToUpdate = ["new.netidhub.com", "netidhub.com"]; domainsToUpdate.forEach((domain) => { if ( diff --git a/components/form/broadcast/content-blast-form.tsx b/components/form/broadcast/content-blast-form.tsx index e4deae1c..553f2452 100644 --- a/components/form/broadcast/content-blast-form.tsx +++ b/components/form/broadcast/content-blast-form.tsx @@ -203,7 +203,7 @@ export default function ContentBlast() { form.setValue("title", details.title); form.setValue("url", details.pageUrl); let pageUrl = details?.pageUrl || ""; - if (pageUrl.includes("mediahub.polri.go.id")) { + if (pageUrl.includes("new.netidhub.com")) { pageUrl = pageUrl.replace( /(\.id)(\/|$)/, (match: any, p1: any, p2: any) => { @@ -537,7 +537,7 @@ export default function ContentBlast() { // const response = await detailMediaSummary(String(id)); // const details = response?.data?.data; // let pageUrl = details?.pageUrl || ""; -// if (pageUrl.includes("mediahub.polri.go.id")) { +// if (pageUrl.includes("new.netidhub.com")) { // pageUrl = pageUrl.replace( // /(\.id)(\/|$)/, // (match: any, p1: any, p2: any) => { @@ -564,7 +564,7 @@ export default function ContentBlast() { // form.setValue("title", `${details?.title}`); // form.setValue( // "url", -// details?.pageUrl || "https://mediahub.polri.go.id" +// details?.pageUrl || "https://new.netidhub.com" // ); // if (type == "wa") { // body = `${textEllipsis(details?.description, 150)}`; diff --git a/components/form/task-ta/task-ta-detail-form.tsx b/components/form/task-ta/task-ta-detail-form.tsx index 443c6f21..398b923e 100644 --- a/components/form/task-ta/task-ta-detail-form.tsx +++ b/components/form/task-ta/task-ta-detail-form.tsx @@ -1302,7 +1302,7 @@ export default function FormTaskTaDetail() { className="flex gap-3 items-center cursor-pointer" onClick={() => setSelectedVideo( - `https://mediahub.polri.go.id/api/v2/assignment-expert/file/viewer?id=${file.id}` + `https://new.netidhub.com/api/v2/assignment-expert/file/viewer?id=${file.id}` ) } > diff --git a/components/main/audio-detail.tsx b/components/main/audio-detail.tsx index 517a663a..47e975af 100644 --- a/components/main/audio-detail.tsx +++ b/components/main/audio-detail.tsx @@ -892,7 +892,7 @@ const DetailAudio = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -907,7 +907,7 @@ const DetailAudio = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -922,7 +922,7 @@ const DetailAudio = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/components/main/document-detail.tsx b/components/main/document-detail.tsx index 607dc2dd..f916d848 100644 --- a/components/main/document-detail.tsx +++ b/components/main/document-detail.tsx @@ -742,7 +742,7 @@ const DetailDocument = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -757,7 +757,7 @@ const DetailDocument = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -772,7 +772,7 @@ const DetailDocument = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/components/main/image-detail.tsx b/components/main/image-detail.tsx index c27ebc6e..7a47ee33 100644 --- a/components/main/image-detail.tsx +++ b/components/main/image-detail.tsx @@ -891,7 +891,7 @@ const DetailImage = (data: any) => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -906,7 +906,7 @@ const DetailImage = (data: any) => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -921,7 +921,7 @@ const DetailImage = (data: any) => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/components/main/video-detail.tsx b/components/main/video-detail.tsx index f2cc40b1..3863ff83 100644 --- a/components/main/video-detail.tsx +++ b/components/main/video-detail.tsx @@ -711,7 +711,7 @@ const DetailVideo = () => { onClick={() => handleShare( "fb", - `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` + `https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}"e=${content?.title}` ) } > @@ -726,7 +726,7 @@ const DetailVideo = () => { onClick={() => handleShare( "tw", - `https://twitter.com/share?url=https%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` + `https://twitter.com/share?url=https%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}&text=${content?.title}` ) } > @@ -741,7 +741,7 @@ const DetailVideo = () => { onClick={() => handleShare( "wa", - `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fmediahub.polri.go.id%2F${typeString}%2Fdetail%2F${content?.id}` + `text=${content?.title}%0D%0A%0D%0Ahttps%3A%2F%2Fnew.netidhub.com%2F${typeString}%2Fdetail%2F${content?.id}` ) } > diff --git a/lib/menus.ts b/lib/menus.ts index 435b5622..d5cb21ec 100644 --- a/lib/menus.ts +++ b/lib/menus.ts @@ -370,7 +370,7 @@ export function getMenuList(pathname: string, t: any): Group[] { // children: [], // }, // { - // href: "https://nat-mediahub.polri.go.id/", + // href: "https://nat-new.netidhub.com/", // label: "Mediahub 2022", // active: pathname === "/admin/settings/mediahub-2022", // icon: "heroicons:arrow-trending-up", @@ -3934,7 +3934,7 @@ export function getMenuList(pathname: string, t: any): Group[] { // children: [], // }, // { - // href: "https://nat-mediahub.polri.go.id/", + // href: "https://nat-new.netidhub.com/", // label: "Mediahub 2022", // active: pathname === "/admin/settings/mediahub-2022", // icon: "heroicons:arrow-trending-up", @@ -4157,7 +4157,7 @@ export function getMenuList(pathname: string, t: any): Group[] { children: [], }, { - href: "https://nat-mediahub.polri.go.id/", + href: "https://nat-new.netidhub.com/", label: "Mediahub 2022", active: pathname === "/admin/settings/mediahub-2022", icon: "heroicons:arrow-trending-up", @@ -4366,7 +4366,7 @@ export function getMenuList(pathname: string, t: any): Group[] { // children: [], // }, // { - // href: "https://nat-mediahub.polri.go.id/", + // href: "https://nat-new.netidhub.com/", // label: "Mediahub 2022", // active: pathname === "/admin/settings/mediahub-2022", // icon: "heroicons:arrow-trending-up", diff --git a/service/http-config/axios-base-prod-instance.ts b/service/http-config/axios-base-prod-instance.ts index c3180190..a828576a 100644 --- a/service/http-config/axios-base-prod-instance.ts +++ b/service/http-config/axios-base-prod-instance.ts @@ -1,6 +1,6 @@ import axios from "axios"; -const baseURL = "https://mediahub.polri.go.id/api/"; +const baseURL = "https://new.netidhub.com/api/"; const axiosBaseProdInstance = axios.create({ baseURL, diff --git a/service/http-config/axiosInstanceJson.ts b/service/http-config/axiosInstanceJson.ts index 77aca3b5..5e2c62a7 100644 --- a/service/http-config/axiosInstanceJson.ts +++ b/service/http-config/axiosInstanceJson.ts @@ -1,6 +1,6 @@ import axios from "axios"; -const baseURL = "https://mediahub.polri.go.id/api/"; +const baseURL = "https://new.netidhub.com/api/"; const axiosInstanceJson = axios.create({ baseURL,