|
@@ -1,8 +1,10 @@
|
|
|
import { get, post } from "@/config/request";
|
|
import { get, post } from "@/config/request";
|
|
|
|
|
+import axios from "axios";
|
|
|
|
|
+const url = "http://localhost:1880";
|
|
|
|
|
|
|
|
export const notifLaporanBaru = async (data) => {
|
|
export const notifLaporanBaru = async (data) => {
|
|
|
try {
|
|
try {
|
|
|
- const response = await post("/notifikasi/laporan-baru", data);
|
|
|
|
|
|
|
+ const response = await axios.post(url + "/notifikasi/laporan-baru", data);
|
|
|
return response.data;
|
|
return response.data;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
if (error.response.data) return error.response.data;
|
|
if (error.response.data) return error.response.data;
|
|
@@ -13,7 +15,7 @@ export const notifLaporanBaru = async (data) => {
|
|
|
|
|
|
|
|
export const notifKeberatan = async (data) => {
|
|
export const notifKeberatan = async (data) => {
|
|
|
try {
|
|
try {
|
|
|
- const response = await post("/notifikasi/keberatan", data);
|
|
|
|
|
|
|
+ const response = await axios.post(url + "/notifikasi/keberatan", data);
|
|
|
return response.data;
|
|
return response.data;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
if (error.response.data) return error.response.data;
|
|
if (error.response.data) return error.response.data;
|
|
@@ -24,7 +26,7 @@ export const notifKeberatan = async (data) => {
|
|
|
|
|
|
|
|
export const notifBanding = async (data) => {
|
|
export const notifBanding = async (data) => {
|
|
|
try {
|
|
try {
|
|
|
- const response = await post("/notifikasi/banding", data);
|
|
|
|
|
|
|
+ const response = await axios.post(url + "/notifikasi/banding", data);
|
|
|
return response.data;
|
|
return response.data;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
if (error.response.data) return error.response.data;
|
|
if (error.response.data) return error.response.data;
|
|
@@ -35,7 +37,7 @@ export const notifBanding = async (data) => {
|
|
|
|
|
|
|
|
export const notifDocPerbaikan = async (data) => {
|
|
export const notifDocPerbaikan = async (data) => {
|
|
|
try {
|
|
try {
|
|
|
- const response = await post("/notifikasi/doc-perbaikan", data);
|
|
|
|
|
|
|
+ const response = await axios.post(url + "/notifikasi/doc-perbaikan", data);
|
|
|
return response.data;
|
|
return response.data;
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
if (error.response.data) return error.response.data;
|
|
if (error.response.data) return error.response.data;
|