Browse Source

localhost to ptb-Backend

Signed-off-by: rizqevo <rizqevo@hotmail.com>
rizqevo 3 years ago
parent
commit
c4306f598d

+ 1 - 1
actions/cabutSanksi.js

@@ -2,7 +2,7 @@ import { post } from "../config/request";
 
 export const addCabutSanksi = async ({ noSanksi, ptId }, data) => {
 	try {
-		const res = await post(`http://localhost:5000/cabut-sanksi/add?noSanksi=${noSanksi}&ptId=${ptId}`, data);
+		const res = await post(`http://ptb-Backend:5000/cabut-sanksi/add?noSanksi=${noSanksi}&ptId=${ptId}`, data);
 		console.log(res);
 		return res.data;
 	} catch (error) {

+ 2 - 2
actions/pelanggaran.js

@@ -12,7 +12,7 @@ export const getPelanggaranId = async (id) => {
 			headers: myHeaders,
 		};
 
-		const res = await fetch("http://localhost:5000/pelanggaran", requestOptions);
+		const res = await fetch("http://ptb-Backend:5000/pelanggaran", requestOptions);
 		return await res.json();
 	} catch (error) {
 		console.log("error", error);
@@ -22,7 +22,7 @@ export const getPelanggaranId = async (id) => {
 
 export const getPelanggaran = async () => {
 	try {
-		const res = await fetch("http://localhost:5000/pelanggaran");
+		const res = await fetch("http://ptb-Backend:5000/pelanggaran");
 		return await res.json();
 	} catch (error) {
 		console.log("error", error);

+ 1 - 1
actions/sanksi.js

@@ -13,7 +13,7 @@ export const createSanksi = async ({ number, ptId }, data) => {
 
 export const getSanksi = async (query = {}) => {
 	try {
-		let url = "http://localhost:5000/sanksi";
+		let url = "http://ptb-Backend:5000/sanksi";
 		if (query != null) {
 			const { ptId, noSanksi, keberatan, jawaban, banding, active, cabutSanksi, docPerbaikan, role, orgId } = query;
 			url += "?";

+ 1 - 1
config/axios.js

@@ -2,7 +2,7 @@ import axios from "axios";
 // import jwt_decode from "jwt-decode";
 
 const axiosAPI = axios.create({
-	baseURL: "http://localhost:5000",
+	baseURL: "http://ptb-Backend:5000",
 	withCredentials: true,
 });
 

+ 3 - 3
store/actions/pelaporan.js

@@ -18,7 +18,7 @@ export const listPelaporan = () => async (dispatch) => {
 	try {
 		dispatch({ type: PELAPORAN_LIST_REQUEST });
 
-		const res = await fetch("http://localhost:5000/pelaporan");
+		const res = await fetch("http://ptb-Backend:5000/pelaporan");
 		const { data } = await res.json();
 
 		dispatch({
@@ -37,7 +37,7 @@ export const listPelaporanDetails = (number, ptId) => async (dispatch) => {
 	try {
 		dispatch({ type: PELAPORAN_DETAILS_REQUEST });
 
-		const res = await fetch(`http://localhost:5000/pelaporan?number=${number}&ptId=${ptId}`);
+		const res = await fetch(`http://ptb-Backend:5000/pelaporan?number=${number}&ptId=${ptId}`);
 		const { data } = await res.json();
 
 		dispatch({
@@ -58,7 +58,7 @@ export const createPelaporan = (pelaporanResult) => async (dispatch) => {
 			type: PELAPORAN_CREATE_REQUEST,
 		});
 
-		const res = await fetch("http://localhost:5000/pelaporan/create", {
+		const res = await fetch("http://ptb-Backend:5000/pelaporan/create", {
 			method: "POST",
 			body: pelaporanResult,
 		});

+ 1 - 1
store/actions/penjadwalan.js

@@ -13,7 +13,7 @@ export const createPenjadwalan =
 
 			const myHeaders = new Headers();
 			myHeaders.append("Content-Type", "application/json");
-			const res = await fetch(`http://localhost:5000/pelaporan/jadwal/add?number=${number}&ptId=${ptId}`, {
+			const res = await fetch(`http://ptb-Backend:5000/pelaporan/jadwal/add?number=${number}&ptId=${ptId}`, {
 				method: "POST",
 				body: penjadwalanData,
 				headers: myHeaders,