yazid138 3 yıl önce
ebeveyn
işleme
dc2719da30
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6 4
      actions/notifikasi.js

+ 6 - 4
actions/notifikasi.js

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