Skip to content

Commit

Permalink
#13 hotfix : BE API https 로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
wkdghdwns199 committed Sep 13, 2024
1 parent d5acaa5 commit 12324d3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
32 changes: 17 additions & 15 deletions client/src/api/sendToServer.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import axios, {AxiosResponse} from "axios";
import {studentQr} from "../types/QrType/StudentQr";
import axios, {AxiosResponse} from 'axios';
import {studentQr} from '../types/QrType/StudentQr';

interface ServerResponse {
message: string | null;
message: string | null;
}

export const sendToServer = (data: studentQr): Promise<AxiosResponse<ServerResponse>> => {
return axios
.post("http://34.47.97.81:8080/api/events/check-in",data)
.then((res) => {
console.log(res);
return res;
})
.catch((error) => {
console.log(error);
throw error;
})
}
export const sendToServer = (
data: studentQr,
): Promise<AxiosResponse<ServerResponse>> => {
return axios
.post('https://zepelown.site/api/events/check-in', data)
.then(res => {
console.log(res);
return res;
})
.catch(error => {
console.log(error);
throw error;
});
};
2 changes: 1 addition & 1 deletion client/src/hooks/useCheckInStudent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const useCheckInStudent = (eventId: string) => {

const LoadCheckInStudent = () => {
axios
.get(`http://34.47.97.81:8080/api/events/check-in/${eventId}?filter=ALL`)
.get(`https://zepelown.site/api/events/check-in/${eventId}?filter=ALL`)
.then(res => {
const CleanedData = res.data.data;

Expand Down

0 comments on commit 12324d3

Please sign in to comment.