|
|
@@ -1,4 +1,4 @@
|
|
|
-import { get } from "@/config/request";
|
|
|
+import { get } from "../config/request";
|
|
|
|
|
|
export const getPelanggaranId = async (id) => {
|
|
|
try {
|
|
|
@@ -15,7 +15,7 @@ export const getPelanggaranId = async (id) => {
|
|
|
};
|
|
|
|
|
|
const res = await get("/pelanggaran", requestOptions);
|
|
|
- return await res.json();
|
|
|
+ return await res.data;
|
|
|
} catch (error) {
|
|
|
console.log("error", error);
|
|
|
return false;
|
|
|
@@ -25,7 +25,7 @@ export const getPelanggaranId = async (id) => {
|
|
|
export const getPelanggaran = async () => {
|
|
|
try {
|
|
|
const res = await get("/pelanggaran");
|
|
|
- return await res.json();
|
|
|
+ return await res.data;
|
|
|
} catch (error) {
|
|
|
console.log("error", error);
|
|
|
return false;
|