Files
frontend/packages/common/components/src/api/connection-log.ts
T

35 lines
718 B
TypeScript

import { ENDPOINT } from "../config";
import { getApiClient } from "./client";
export interface ConnectionLog {
cntnSn: number;
cntnDt: string;
cntnId: string;
cntnIp: string;
cntnRgn: string;
wbsrKnd: string;
menuCd: number;
siteId: string;
urlPath: string;
}
export interface ConnectionLogPayload {
cntnId?: string;
cntnIp?: string;
cntnRgn?: string;
wbsrKnd?: string;
menuCd?: number | null;
siteId?: string;
urlPath: string;
}
const client = getApiClient();
export const saveConnectionLog = async (payload: ConnectionLogPayload) => {
const response = await client.post<ConnectionLog>(
`${ENDPOINT.CMS_SERVICE.CONNECTION_LOG}`,
payload,
);
return response.data;
};