|
|
@@ -40,3 +40,18 @@ export const getLogPublic = async ({ no_hp, no_laporan }) => {
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+export const createLog = async (token, data) => {
|
|
|
+ const res = await axios.post("/log", data, { headers: { Authorization: token } });
|
|
|
+ return res.data;
|
|
|
+};
|
|
|
+
|
|
|
+export const getLogAdmin = async (token) => {
|
|
|
+ try {
|
|
|
+ const res = await axios.get(`/log`, { headers: { Authorization: token } });
|
|
|
+ return res.data;
|
|
|
+ } catch (error) {
|
|
|
+ console.log("error", error);
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|