update api config
This commit is contained in:
parent
58c96e10f7
commit
f7d301fef2
|
|
@ -1,3 +1,4 @@
|
|||
import { WS_URL } from "@/services/api";
|
||||
import { useEffect, useState, useRef } from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { Link } from "react-router-dom";
|
||||
|
|
@ -49,7 +50,7 @@ export default function ViewsAdminUploadSuccess() {
|
|||
useEffect(() => {
|
||||
if (!validatedData?.job_id) return;
|
||||
|
||||
const wsUrl = `ws://labai.polinema.ac.id:808/ws/job/${validatedData.job_id}`;
|
||||
const wsUrl = `${WS_URL}/ws/job/${validatedData.job_id}`;
|
||||
const ws = new WebSocket(wsUrl);
|
||||
|
||||
wsRef.current = ws;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
import axios from "axios";
|
||||
import { getToken } from "../utils/auth";
|
||||
|
||||
export const API_URL = 'http://labai.polinema.ac.id:808'
|
||||
export const WS_URL = 'ws://labai.polinema.ac.id:808'
|
||||
|
||||
const api = axios.create({
|
||||
baseURL: "http://labai.polinema.ac.id:808",
|
||||
baseURL: API_URL,
|
||||
});
|
||||
|
||||
api.interceptors.request.use((config) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user