web-humas-fe/service/activity-log.ts

22 lines
659 B
TypeScript

import { PaginationRequest } from "@/types/globals";
import { httpGet, httpPost, httpPut } from "./http-config/axios-base-service";
export async function saveActivity(data: any, token?: string) {
const headers = token
? {
"content-type": "application/json",
Authorization: `Bearer ${token}`,
}
: {
"content-type": "application/json",
};
const pathUrl = `/activity-logs`;
return await httpPost(pathUrl, headers, data);
}
export async function getActivity() {
const headers = { "content-type": "application/json" };
const pathUrl = `/activity-logs/statistics`;
return await httpGet(pathUrl, headers);
}