Skip to content

Commit

Permalink
feat: 백엔드 API연결
Browse files Browse the repository at this point in the history
  • Loading branch information
JjungminLee committed Feb 21, 2024
1 parent f545a64 commit 2648ed3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { SetLocalStorage, SetLocalStorageClear } from './SetLocalStorage';
import { postLog } from './apis/postLog';
import { LogPayloadParams, ServiceNameType } from './types/LogType';
import CryptoJS from 'crypto-js';

Expand Down Expand Up @@ -95,6 +96,7 @@ window.addEventListener('unload', async (event) => {

const logList: any[] = JSON.parse(localStorage.getItem('yls-web') as string) || [];

// const res = await postLog(logList);
const res = await postLog(logList);
console.log(res);
SetLocalStorageClear();
});
4 changes: 2 additions & 2 deletions src/apis/postLog.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import customedAxios from './customedAxios';

export const postLog = async () => {
const res = await customedAxios.put('');
export const postLog = async (data: any) => {
const res = await customedAxios.put('/log/list', data);
return res.data;
};

0 comments on commit 2648ed3

Please sign in to comment.