web-mikul-news/service/activity-log.ts

20 lines
530 B
TypeScript
Raw Permalink Normal View History

2025-07-03 17:18:54 +00:00
import { httpGet, httpPost } from "./http-config/http-base-services";
2025-07-02 15:44:00 +00:00
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`;
2025-07-03 17:18:54 +00:00
return await httpPost(pathUrl, data, headers);
2025-07-02 15:44:00 +00:00
}
export async function getActivity() {
const pathUrl = `/activity-logs/statistics`;
2025-07-03 17:18:54 +00:00
return await httpGet(pathUrl);
2025-07-02 15:44:00 +00:00
}