fix: change api url

This commit is contained in:
Sabda Yagra 2025-12-17 15:17:01 +07:00
parent fcfa24b06c
commit 9a1b41e90b
19 changed files with 187 additions and 187 deletions

4
.env
View File

@ -1,3 +1,3 @@
NEXT_PUBLIC_API=https://netidhub.com/api NEXT_PUBLIC_API=https://new.netidhub.com/api
NEXT_PUBLIC=https://netidhub.com NEXT_PUBLIC=https://new.netidhub.com
NEXT_PUBLIC_TINYMCE_API_KEY=bhteuja26yz5p0aubxry9b95hs33amgn65kjv5km0fd5iuev NEXT_PUBLIC_TINYMCE_API_KEY=bhteuja26yz5p0aubxry9b95hs33amgn65kjv5km0fd5iuev

View File

@ -153,7 +153,7 @@ const useTableColumns = ({
// try { // try {
// loading(); // loading();
// const response = await axios.get( // const response = await axios.get(
// `https://netidhub.com/api/media/report/download?id=${id}`, // `https://new.netidhub.com/api/media/report/download?id=${id}`,
// { // {
// responseType: "blob", // responseType: "blob",
// } // }

View File

@ -85,7 +85,7 @@ const LatestNews = (props: { type: string }) => {
// useEffect(() => { // useEffect(() => {
// async function fetchCategories() { // async function fetchCategories() {
// const url = "https://netidhub.com/api/csrf"; // const url = "https://new.netidhub.com/api/csrf";
// try { // try {
// const response = await fetch(url); // const response = await fetch(url);

View File

@ -82,7 +82,7 @@ const NationalNews = () => {
// useEffect(() => { // useEffect(() => {
// async function fetchCategories() { // async function fetchCategories() {
// const url = "https://netidhub.com/api/csrf"; // const url = "https://new.netidhub.com/api/csrf";
// try { // try {
// const response = await fetch(url); // const response = await fetch(url);

View File

@ -23,7 +23,7 @@ const PopularNews = () => {
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);

View File

@ -75,7 +75,7 @@ const RegionalNews = () => {
// useEffect(() => { // useEffect(() => {
// async function fetchCategories() { // async function fetchCategories() {
// const url = "https://netidhub.com/api/csrf"; // const url = "https://new.netidhub.com/api/csrf";
// try { // try {
// const response = await fetch(url); // const response = await fetch(url);

View File

@ -530,7 +530,7 @@ export function TambahIklanDetail() {
</p> </p>
<Image <Image
src={`https://netidhub.com/api/advertisements/viewer/${id}`} src={`https://new.netidhub.com/api/advertisements/viewer/${id}`}
alt="Thumbnail Gambar Utama" alt="Thumbnail Gambar Utama"
className=" rounded-md my-3" className=" rounded-md my-3"
width={300} width={300}

View File

@ -296,7 +296,7 @@ export function TambahIklanUpdate() {
formMedia.append("file", imageFiles[0]); formMedia.append("file", imageFiles[0]);
} else if (detail?.id) { } else if (detail?.id) {
const existingFile = await fetchExistingImageAsFile( const existingFile = await fetchExistingImageAsFile(
`https://netidhub.com/api/advertisements/viewer/${detail.id}`, `https://new.netidhub.com/api/advertisements/viewer/${detail.id}`,
"existing-image.jpg" "existing-image.jpg"
); );
formMedia.append("file", existingFile); formMedia.append("file", existingFile);
@ -631,7 +631,7 @@ export function TambahIklanUpdate() {
))} ))}
<Image <Image
src={`https://netidhub.com/api/advertisements/viewer/${id}`} src={`https://new.netidhub.com/api/advertisements/viewer/${id}`}
alt="Thumbnail Gambar Utama" alt="Thumbnail Gambar Utama"
className=" rounded-md my-3" className=" rounded-md my-3"
width={300} width={300}

View File

@ -63,7 +63,7 @@ type HeroModalProps = {
// useEffect(() => { // useEffect(() => {
// async function fetchCategories() { // async function fetchCategories() {
// const url = "https://netidhub.com/api/csrf"; // const url = "https://new.netidhub.com/api/csrf";
// try { // try {
// const response = await fetch(url); // const response = await fetch(url);

View File

@ -50,7 +50,7 @@ const HeroModal = ({ onClose }: { onClose: () => void }) => {
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);
@ -268,7 +268,7 @@ const Hero = (props: { group?: string }) => {
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);

View File

@ -36,7 +36,7 @@ const ScrollableContentPolda = () => {
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);

View File

@ -35,7 +35,7 @@ const ScrollableContentSatker = () => {
: ""; : "";
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);

View File

@ -39,7 +39,7 @@ const ScrollableContent = () => {
useEffect(() => { useEffect(() => {
async function fetchCategories() { async function fetchCategories() {
const url = "https://netidhub.com/api/csrf"; const url = "https://new.netidhub.com/api/csrf";
try { try {
const response = await fetch(url); const response = await fetch(url);

View File

@ -31,7 +31,7 @@ const DashCodeFooter = () => {
> >
<div className="h-[50px] w-[50px] rounded-full relative left-[0px] top-[0px] custom-dropshadow"> <div className="h-[50px] w-[50px] rounded-full relative left-[0px] top-[0px] custom-dropshadow">
<Image <Image
src={"https://netidhub.com/assets/img/user-avatar.png"} src={"https://new.netidhub.com/assets/img/user-avatar.png"}
alt={"Image"} alt={"Image"}
width={50} width={50}
height={50} height={50}

File diff suppressed because it is too large Load Diff

View File

@ -45,7 +45,7 @@ export async function getCsrfToken() {
"content-type": "application/json", "content-type": "application/json",
}; };
return httpGet(pathUrl, headers); return httpGet(pathUrl, headers);
// const url = 'https://netidhub.com/api/csrf'; // const url = 'https://new.netidhub.com/api/csrf';
// try { // try {
// const response = await fetch(url, { // const response = await fetch(url, {
// method: 'GET', // method: 'GET',

View File

@ -1,6 +1,6 @@
import axios from "axios"; import axios from "axios";
const baseURL = "https://netidhub.com/api/"; const baseURL = "https://new.netidhub.com/api/";
const axiosBaseInstance = axios.create({ const axiosBaseInstance = axios.create({
baseURL, baseURL,

View File

@ -2,7 +2,7 @@ import axios from "axios";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import { getCsrfToken, login } from "../auth"; import { getCsrfToken, login } from "../auth";
const baseURL = "https://netidhub.com/api/"; const baseURL = "https://new.netidhub.com/api/";
const refreshToken = Cookies.get("refresh_token"); const refreshToken = Cookies.get("refresh_token");

View File

@ -12,7 +12,7 @@ export async function getCsrfToken() {
"content-type": "application/json", "content-type": "application/json",
}; };
return httpGet(pathUrl, headers); return httpGet(pathUrl, headers);
// const url = 'https://netidhub.com/api/csrf'; // const url = 'https://new.netidhub.com/api/csrf';
// try { // try {
// const response = await fetch(url, { // const response = await fetch(url, {
// method: 'GET', // method: 'GET',